| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:10:5 |
| | |
| LL | assert!(true); |
| | ^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| = note: `-D clippy::assertions-on-constants` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::assertions_on_constants)]` |
| |
| error: this assertion is always `false` |
| --> tests/ui/assertions_on_constants.rs:13:5 |
| | |
| LL | assert!(false); |
| | ^^^^^^^^^^^^^^ |
| | |
| = help: replace this with `panic!()` or `unreachable!()` |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:16:5 |
| | |
| LL | assert!(true, "true message"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion is always `false` |
| --> tests/ui/assertions_on_constants.rs:19:5 |
| | |
| LL | assert!(false, "false message"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: replace this with `panic!()` or `unreachable!()` |
| |
| error: this assertion is always `false` |
| --> tests/ui/assertions_on_constants.rs:23:5 |
| | |
| LL | assert!(false, "{}", msg.to_uppercase()); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: replace this with `panic!()` or `unreachable!()` |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:27:5 |
| | |
| LL | assert!(B); |
| | ^^^^^^^^^^ |
| | |
| = help: consider moving this into a const block: `const { assert!(..) }` |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:31:5 |
| | |
| LL | assert!(C); |
| | ^^^^^^^^^^ |
| | |
| = help: consider moving this into a const block: `const { assert!(..) }` |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:34:5 |
| | |
| LL | assert!(C, "C message"); |
| | ^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: consider moving this into a const block: `const { assert!(..) }` |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:37:5 |
| | |
| LL | debug_assert!(true); |
| | ^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:45:5 |
| | |
| LL | assert!(cfg!(feature = "hey") || cfg!(not(feature = "asdf"))); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: consider moving this into a const block: `const { assert!(..) }` |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:54:19 |
| | |
| LL | const _: () = assert!(true); |
| | ^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:57:5 |
| | |
| LL | assert!(8 == (7 + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:68:5 |
| | |
| LL | assert!(true); |
| | ^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion is always `true` |
| --> tests/ui/assertions_on_constants.rs:71:5 |
| | |
| LL | assert!(8 == (7 + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = help: remove the assertion |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:79:5 |
| | |
| LL | assert!(C); |
| | ^^^^^^^^^^ |
| | |
| = help: consider moving this to an anonymous constant: `const _: () = { assert!(..); }` |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:90:5 |
| | |
| LL | assert!(C); |
| | ^^^^^^^^^^ |
| | |
| = help: consider moving this into a const block: `const { assert!(..) }` |
| |
| error: this assertion has a constant value |
| --> tests/ui/assertions_on_constants.rs:96:5 |
| | |
| LL | assert!(C); |
| | ^^^^^^^^^^ |
| | |
| = help: consider moving this to an anonymous constant: `const _: () = { assert!(..); }` |
| |
| error: aborting due to 17 previous errors |
| |