bors af43950143 Auto merge of #3740 - flip1995:const_assert_macro, r=oli-obk
Macro check for assertion_on_constants lint

The `assertion_on_constants` lint currently has following output for this code [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6f2c9df6fc50baf847212d3b5136ee97):
```rust
macro_rules! assert_const {
    ($len:expr) => {
        assert!($len > 0);
    }
}

fn main() {
    assert_const!(3);
    assert_const!(-1);
}
```
```
warning: assert!(const: true) will be optimized out by the compiler
 --> src/main.rs:3:9
  |
3 |         assert!($len > 0);
  |         ^^^^^^^^^^^^^^^^^^
...
8 |     assert_const!(3);
  |     ---------------- in this macro invocation
  |
  = note: #[warn(clippy::assertions_on_constants)] on by default
  = help: remove it
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants

warning: assert!(const: false) should probably be replaced
 --> src/main.rs:3:9
  |
3 |         assert!($len > 0);
  |         ^^^^^^^^^^^^^^^^^^
...
9 |     assert_const!(-1);
  |     ----------------- in this macro invocation
  |
  = help: use panic!() or unreachable!()
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
```

This is contradictory. This lint should not trigger if the `assert!` is in a macro itself.
2019-02-10 12:47:16 +00:00
..
2019-02-06 08:17:39 +01:00
2019-01-29 08:19:05 +01:00
2019-01-21 13:59:49 +01:00
2019-01-08 21:46:39 +01:00
2019-01-07 14:37:28 +01:00
2019-01-31 06:32:29 +02:00
2019-01-31 06:32:29 +02:00
2019-01-27 13:46:22 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-02-10 10:48:24 +01:00
2019-01-08 21:46:39 +01:00
2019-01-15 08:09:47 +02:00
2019-02-01 13:21:19 -05:00
2018-10-13 00:42:55 +02:00
2018-12-09 23:26:16 +01:00
2018-12-28 12:41:12 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-27 13:46:22 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00
2018-07-16 11:46:37 +02:00
2019-01-13 19:57:19 +01:00
2019-01-13 19:57:19 +01:00
2019-01-13 19:57:19 +01:00
2019-01-29 07:22:08 +02:00
2019-01-29 07:22:08 +02:00
2019-01-22 15:16:54 +01:00
2019-01-22 15:16:54 +01:00
2019-01-22 15:16:54 +01:00
2019-01-08 21:46:39 +01:00
2019-01-08 21:46:39 +01:00