summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/neg_multiply.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/neg_multiply.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/neg_multiply.stderr')
-rw-r--r--src/tools/clippy/tests/ui/neg_multiply.stderr52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/neg_multiply.stderr b/src/tools/clippy/tests/ui/neg_multiply.stderr
new file mode 100644
index 000000000..388ef29eb
--- /dev/null
+++ b/src/tools/clippy/tests/ui/neg_multiply.stderr
@@ -0,0 +1,52 @@
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:29:5
+ |
+LL | x * -1;
+ | ^^^^^^ help: consider using: `-x`
+ |
+ = note: `-D clippy::neg-multiply` implied by `-D warnings`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:31:5
+ |
+LL | -1 * x;
+ | ^^^^^^ help: consider using: `-x`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:33:11
+ |
+LL | 100 + x * -1;
+ | ^^^^^^ help: consider using: `-x`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:35:5
+ |
+LL | (100 + x) * -1;
+ | ^^^^^^^^^^^^^^ help: consider using: `-(100 + x)`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:37:5
+ |
+LL | -1 * 17;
+ | ^^^^^^^ help: consider using: `-17`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:39:14
+ |
+LL | 0xcafe | 0xff00 * -1;
+ | ^^^^^^^^^^^ help: consider using: `-0xff00`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:41:5
+ |
+LL | 3_usize as i32 * -1;
+ | ^^^^^^^^^^^^^^^^^^^ help: consider using: `-(3_usize as i32)`
+
+error: this multiplication by -1 can be written more succinctly
+ --> $DIR/neg_multiply.rs:42:5
+ |
+LL | (3_usize as i32) * -1;
+ | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(3_usize as i32)`
+
+error: aborting due to 8 previous errors
+