summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/assertions_on_constants.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/assertions_on_constants.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/assertions_on_constants.stderr')
-rw-r--r--src/tools/clippy/tests/ui/assertions_on_constants.stderr75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/assertions_on_constants.stderr b/src/tools/clippy/tests/ui/assertions_on_constants.stderr
new file mode 100644
index 000000000..e1f818814
--- /dev/null
+++ b/src/tools/clippy/tests/ui/assertions_on_constants.stderr
@@ -0,0 +1,75 @@
+error: `assert!(true)` will be optimized out by the compiler
+ --> $DIR/assertions_on_constants.rs:10:5
+ |
+LL | assert!(true);
+ | ^^^^^^^^^^^^^
+ |
+ = note: `-D clippy::assertions-on-constants` implied by `-D warnings`
+ = help: remove it
+
+error: `assert!(false)` should probably be replaced
+ --> $DIR/assertions_on_constants.rs:11:5
+ |
+LL | assert!(false);
+ | ^^^^^^^^^^^^^^
+ |
+ = help: use `panic!()` or `unreachable!()`
+
+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!(..)`
+
+error: `assert!(true)` will be optimized out by the compiler
+ --> $DIR/assertions_on_constants.rs:19:5
+ |
+LL | assert!(B);
+ | ^^^^^^^^^^
+ |
+ = help: remove it
+
+error: `assert!(false)` should probably be replaced
+ --> $DIR/assertions_on_constants.rs:22:5
+ |
+LL | assert!(C);
+ | ^^^^^^^^^^
+ |
+ = 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
+