From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/lint/unused/must-use-ops.stderr | 238 ++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 src/test/ui/lint/unused/must-use-ops.stderr (limited to 'src/test/ui/lint/unused/must-use-ops.stderr') diff --git a/src/test/ui/lint/unused/must-use-ops.stderr b/src/test/ui/lint/unused/must-use-ops.stderr new file mode 100644 index 000000000..b248dd0fe --- /dev/null +++ b/src/test/ui/lint/unused/must-use-ops.stderr @@ -0,0 +1,238 @@ +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:12:5 + | +LL | val == 1; + | ^^^^^^^^ the comparison produces a value + | +note: the lint level is defined here + --> $DIR/must-use-ops.rs:5:9 + | +LL | #![warn(unused_must_use)] + | ^^^^^^^^^^^^^^^ +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val == 1; + | +++++++ + +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:13:5 + | +LL | val < 1; + | ^^^^^^^ the comparison produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val < 1; + | +++++++ + +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:14:5 + | +LL | val <= 1; + | ^^^^^^^^ the comparison produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val <= 1; + | +++++++ + +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:15:5 + | +LL | val != 1; + | ^^^^^^^^ the comparison produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val != 1; + | +++++++ + +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:16:5 + | +LL | val >= 1; + | ^^^^^^^^ the comparison produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val >= 1; + | +++++++ + +warning: unused comparison that must be used + --> $DIR/must-use-ops.rs:17:5 + | +LL | val > 1; + | ^^^^^^^ the comparison produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val > 1; + | +++++++ + +warning: unused arithmetic operation that must be used + --> $DIR/must-use-ops.rs:20:5 + | +LL | val + 2; + | ^^^^^^^ the arithmetic operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val + 2; + | +++++++ + +warning: unused arithmetic operation that must be used + --> $DIR/must-use-ops.rs:21:5 + | +LL | val - 2; + | ^^^^^^^ the arithmetic operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val - 2; + | +++++++ + +warning: unused arithmetic operation that must be used + --> $DIR/must-use-ops.rs:22:5 + | +LL | val / 2; + | ^^^^^^^ the arithmetic operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val / 2; + | +++++++ + +warning: unused arithmetic operation that must be used + --> $DIR/must-use-ops.rs:23:5 + | +LL | val * 2; + | ^^^^^^^ the arithmetic operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val * 2; + | +++++++ + +warning: unused arithmetic operation that must be used + --> $DIR/must-use-ops.rs:24:5 + | +LL | val % 2; + | ^^^^^^^ the arithmetic operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = val % 2; + | +++++++ + +warning: unused logical operation that must be used + --> $DIR/must-use-ops.rs:27:5 + | +LL | true && true; + | ^^^^^^^^^^^^ the logical operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = true && true; + | +++++++ + +warning: unused logical operation that must be used + --> $DIR/must-use-ops.rs:28:5 + | +LL | false || true; + | ^^^^^^^^^^^^^ the logical operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = false || true; + | +++++++ + +warning: unused bitwise operation that must be used + --> $DIR/must-use-ops.rs:31:5 + | +LL | 5 ^ val; + | ^^^^^^^ the bitwise operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = 5 ^ val; + | +++++++ + +warning: unused bitwise operation that must be used + --> $DIR/must-use-ops.rs:32:5 + | +LL | 5 & val; + | ^^^^^^^ the bitwise operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = 5 & val; + | +++++++ + +warning: unused bitwise operation that must be used + --> $DIR/must-use-ops.rs:33:5 + | +LL | 5 | val; + | ^^^^^^^ the bitwise operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = 5 | val; + | +++++++ + +warning: unused bitwise operation that must be used + --> $DIR/must-use-ops.rs:34:5 + | +LL | 5 << val; + | ^^^^^^^^ the bitwise operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = 5 << val; + | +++++++ + +warning: unused bitwise operation that must be used + --> $DIR/must-use-ops.rs:35:5 + | +LL | 5 >> val; + | ^^^^^^^^ the bitwise operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = 5 >> val; + | +++++++ + +warning: unused unary operation that must be used + --> $DIR/must-use-ops.rs:38:5 + | +LL | !val; + | ^^^^ the unary operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = !val; + | +++++++ + +warning: unused unary operation that must be used + --> $DIR/must-use-ops.rs:39:5 + | +LL | -val; + | ^^^^ the unary operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = -val; + | +++++++ + +warning: unused unary operation that must be used + --> $DIR/must-use-ops.rs:40:5 + | +LL | *val_pointer; + | ^^^^^^^^^^^^ the unary operation produces a value + | +help: use `let _ = ...` to ignore the resulting value + | +LL | let _ = *val_pointer; + | +++++++ + +warning: 21 warnings emitted + -- cgit v1.2.3