]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/assertions_on_constants.txt
Auto merge of #104673 - matthiaskrgr:rollup-85f65ov, r=matthiaskrgr
[rust.git] / src / tools / clippy / src / docs / assertions_on_constants.txt
1 ### What it does
2 Checks for `assert!(true)` and `assert!(false)` calls.
3
4 ### Why is this bad?
5 Will be optimized out by the compiler or should probably be replaced by a
6 `panic!()` or `unreachable!()`
7
8 ### Example
9 ```
10 assert!(false)
11 assert!(true)
12 const B: bool = false;
13 assert!(B)
14 ```