diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/identity_op.stderr | |
parent | Initial commit. (diff) | |
download | rustc-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/identity_op.stderr')
-rw-r--r-- | src/tools/clippy/tests/ui/identity_op.stderr | 238 |
1 files changed, 238 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/identity_op.stderr b/src/tools/clippy/tests/ui/identity_op.stderr new file mode 100644 index 000000000..1a104a20b --- /dev/null +++ b/src/tools/clippy/tests/ui/identity_op.stderr @@ -0,0 +1,238 @@ +error: this operation has no effect + --> $DIR/identity_op.rs:43:5 + | +LL | x + 0; + | ^^^^^ help: consider reducing it to: `x` + | + = note: `-D clippy::identity-op` implied by `-D warnings` + +error: this operation has no effect + --> $DIR/identity_op.rs:44:5 + | +LL | x + (1 - 1); + | ^^^^^^^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:46:5 + | +LL | 0 + x; + | ^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:49:5 + | +LL | x | (0); + | ^^^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:52:5 + | +LL | x * 1; + | ^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:53:5 + | +LL | 1 * x; + | ^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:59:5 + | +LL | -1 & x; + | ^^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:62:5 + | +LL | u & 255; + | ^^^^^^^ help: consider reducing it to: `u` + +error: this operation has no effect + --> $DIR/identity_op.rs:65:5 + | +LL | 42 << 0; + | ^^^^^^^ help: consider reducing it to: `42` + +error: this operation has no effect + --> $DIR/identity_op.rs:66:5 + | +LL | 1 >> 0; + | ^^^^^^ help: consider reducing it to: `1` + +error: this operation has no effect + --> $DIR/identity_op.rs:67:5 + | +LL | 42 >> 0; + | ^^^^^^^ help: consider reducing it to: `42` + +error: this operation has no effect + --> $DIR/identity_op.rs:68:5 + | +LL | &x >> 0; + | ^^^^^^^ help: consider reducing it to: `&x` + +error: this operation has no effect + --> $DIR/identity_op.rs:69:5 + | +LL | x >> &0; + | ^^^^^^^ help: consider reducing it to: `x` + +error: this operation has no effect + --> $DIR/identity_op.rs:76:5 + | +LL | 2 % 3; + | ^^^^^ help: consider reducing it to: `2` + +error: this operation has no effect + --> $DIR/identity_op.rs:77:5 + | +LL | -2 % 3; + | ^^^^^^ help: consider reducing it to: `-2` + +error: this operation has no effect + --> $DIR/identity_op.rs:78:5 + | +LL | 2 % -3 + x; + | ^^^^^^ help: consider reducing it to: `2` + +error: this operation has no effect + --> $DIR/identity_op.rs:79:5 + | +LL | -2 % -3 + x; + | ^^^^^^^ help: consider reducing it to: `-2` + +error: this operation has no effect + --> $DIR/identity_op.rs:80:9 + | +LL | x + 1 % 3; + | ^^^^^ help: consider reducing it to: `1` + +error: this operation has no effect + --> $DIR/identity_op.rs:88:5 + | +LL | 0 + if b { 1 } else { 2 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:89:5 + | +LL | 0 + if b { 1 } else { 2 } + if b { 3 } else { 4 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:90:5 + | +LL | 0 + match a { 0 => 10, _ => 20 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:91:5 + | +LL | 0 + match a { 0 => 10, _ => 20 } + match a { 0 => 30, _ => 40 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:92:5 + | +LL | 0 + if b { 1 } else { 2 } + match a { 0 => 30, _ => 40 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:93:5 + | +LL | 0 + match a { 0 => 10, _ => 20 } + if b { 3 } else { 4 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:94:5 + | +LL | (if b { 1 } else { 2 }) + 0; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` + +error: this operation has no effect + --> $DIR/identity_op.rs:96:5 + | +LL | 0 + { a } + 3; + | ^^^^^^^^^ help: consider reducing it to: `({ a })` + +error: this operation has no effect + --> $DIR/identity_op.rs:97:5 + | +LL | 0 + { a } * 2; + | ^^^^^^^^^^^^^ help: consider reducing it to: `({ a } * 2)` + +error: this operation has no effect + --> $DIR/identity_op.rs:98:5 + | +LL | 0 + loop { let mut c = 0; if c == 10 { break c; } c += 1; } + { a * 2 }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(loop { let mut c = 0; if c == 10 { break c; } c += 1; })` + +error: this operation has no effect + --> $DIR/identity_op.rs:103:7 + | +LL | f(1 * a + { 8 * 5 }); + | ^^^^^ help: consider reducing it to: `a` + +error: this operation has no effect + --> $DIR/identity_op.rs:104:7 + | +LL | f(0 + if b { 1 } else { 2 } + 3); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `if b { 1 } else { 2 }` + +error: this operation has no effect + --> $DIR/identity_op.rs:105:20 + | +LL | const _: i32 = { 2 * 4 } + 0 + 3; + | ^^^^^^^^^^^^^ help: consider reducing it to: `{ 2 * 4 }` + +error: this operation has no effect + --> $DIR/identity_op.rs:106:20 + | +LL | const _: i32 = 0 + { 1 + 2 * 3 } + 3; + | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `{ 1 + 2 * 3 }` + +error: this operation has no effect + --> $DIR/identity_op.rs:108:5 + | +LL | 0 + a as usize; + | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize` + +error: this operation has no effect + --> $DIR/identity_op.rs:109:13 + | +LL | let _ = 0 + a as usize; + | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize` + +error: this operation has no effect + --> $DIR/identity_op.rs:110:5 + | +LL | 0 + { a } as usize; + | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `({ a } as usize)` + +error: this operation has no effect + --> $DIR/identity_op.rs:112:9 + | +LL | 2 * (0 + { a }); + | ^^^^^^^^^^^ help: consider reducing it to: `{ a }` + +error: this operation has no effect + --> $DIR/identity_op.rs:113:5 + | +LL | 1 * ({ a } + 4); + | ^^^^^^^^^^^^^^^ help: consider reducing it to: `(({ a } + 4))` + +error: this operation has no effect + --> $DIR/identity_op.rs:114:5 + | +LL | 1 * 1; + | ^^^^^ help: consider reducing it to: `1` + +error: this operation has no effect + --> $DIR/identity_op.rs:118:5 + | +LL | 0 + if a { 1 } else { 2 } + if b { 3 } else { 5 } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if a { 1 } else { 2 })` + +error: aborting due to 39 previous errors + |