2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:18:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val == 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the comparison produces a value
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/must-use-ops.rs:5:9
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | #![warn(unused_must_use)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = val == 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:19:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val < 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the comparison produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val < 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:20:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val <= 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the comparison produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val <= 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:21:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val != 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the comparison produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = val != 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:22:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val >= 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the comparison produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val >= 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:23:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val > 1;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the comparison produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val > 1;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused arithmetic operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:26:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val + 2;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the arithmetic operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = val + 2;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused arithmetic operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:27:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val - 2;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the arithmetic operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val - 2;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused arithmetic operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:28:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val / 2;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the arithmetic operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val / 2;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused arithmetic operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:29:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val * 2;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the arithmetic operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = val * 2;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused arithmetic operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:30:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | val % 2;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the arithmetic operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = val % 2;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused logical operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:33:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | true && true;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^^^^^ the logical operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = true && true;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused logical operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:34:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | false || true;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^^^^^^ the logical operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = false || true;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused bitwise operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:37:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | 5 ^ val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the bitwise operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = 5 ^ val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused bitwise operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:38:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | 5 & val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the bitwise operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = 5 & val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused bitwise operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:39:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | 5 | val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^ the bitwise operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = 5 | val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused bitwise operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:40:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | 5 << val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the bitwise operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = 5 << val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused bitwise operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:41:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | 5 >> val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^ the bitwise operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = 5 >> val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused unary operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:44:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | !val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^ the unary operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = !val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused unary operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:45:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | -val;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^ the unary operation produces a value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = -val;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused unary operation that must be used
|
2022-11-13 06:02:52 -06:00
|
|
|
--> $DIR/must-use-ops.rs:46:5
|
2018-04-21 17:06:48 -05:00
|
|
|
|
|
|
|
|
LL | *val_pointer;
|
2021-07-30 16:21:52 -05:00
|
|
|
| ^^^^^^^^^^^^ the unary operation produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-29 15:35:03 -05:00
|
|
|
|
|
2021-07-30 16:21:52 -05:00
|
|
|
LL | let _ = *val_pointer;
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2018-04-21 17:06:48 -05:00
|
|
|
|
2020-03-11 10:30:09 -05:00
|
|
|
warning: 21 warnings emitted
|
|
|
|
|