rust-clippy/tests/ui/assertions_on_constants.stderr

76 lines
2 KiB
Text
Raw Normal View History

2019-04-18 10:05:09 +00:00
error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:10:5
|
LL | assert!(true);
| ^^^^^^^^^^^^^
|
= help: remove it
2022-09-22 16:04:22 +00:00
= note: `-D clippy::assertions-on-constants` implied by `-D warnings`
2019-04-18 10:05:09 +00:00
error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:11:5
|
LL | assert!(false);
| ^^^^^^^^^^^^^^
|
2019-04-18 10:05:09 +00:00
= help: use `panic!()` or `unreachable!()`
2019-04-18 10:05:09 +00:00
error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:12:5
|
LL | assert!(true, "true message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove it
error: `assert!(false, ..)` should probably be replaced
--> $DIR/assertions_on_constants.rs:13:5
|
LL | assert!(false, "false message");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `panic!(..)` or `unreachable!(..)`
error: `assert!(false, ..)` should probably be replaced
--> $DIR/assertions_on_constants.rs:16:5
|
LL | assert!(false, "{}", msg.to_uppercase());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `panic!(..)` or `unreachable!(..)`
2019-10-07 18:40:05 +00:00
error: `assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:19:5
2019-10-07 18:40:05 +00:00
|
LL | assert!(B);
| ^^^^^^^^^^
|
= help: remove it
2019-04-18 10:05:09 +00:00
error: `assert!(false)` should probably be replaced
--> $DIR/assertions_on_constants.rs:22:5
|
LL | assert!(C);
| ^^^^^^^^^^
|
2019-04-18 10:05:09 +00:00
= help: use `panic!()` or `unreachable!()`
error: `assert!(false, ..)` should probably be replaced
--> $DIR/assertions_on_constants.rs:23:5
|
LL | assert!(C, "C message");
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `panic!(..)` or `unreachable!(..)`
error: `debug_assert!(true)` will be optimized out by the compiler
--> $DIR/assertions_on_constants.rs:25:5
|
LL | debug_assert!(true);
| ^^^^^^^^^^^^^^^^^^^
|
= help: remove it
error: aborting due to 9 previous errors