@@ -2,54 +2,72 @@ error: unused borrow that must be used
22 --> $DIR/unused-borrows.rs:6:5
33 |
44LL | &42;
5- | ^^^ help: use `let _ = ...` to ignore it: `let _ = &42`
5+ | ^^^ the borrow produces a value
66 |
77note: the lint level is defined here
88 --> $DIR/unused-borrows.rs:1:9
99 |
1010LL | #![deny(unused_must_use)]
1111 | ^^^^^^^^^^^^^^^
12- = note: the borrow produces a value
12+ help: use `let _ = ...` to ignore the resulting value
13+ |
14+ LL | let _ = &42;
15+ | ^^^^^^^
1316
1417error: unused borrow that must be used
1518 --> $DIR/unused-borrows.rs:9:5
1619 |
1720LL | &mut foo(42);
18- | ^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = &mut foo(42)`
21+ | ^^^^^^^^^^^^ the borrow produces a value
22+ |
23+ help: use `let _ = ...` to ignore the resulting value
1924 |
20- = note: the borrow produces a value
25+ LL | let _ = &mut foo(42);
26+ | ^^^^^^^
2127
2228error: unused borrow that must be used
2329 --> $DIR/unused-borrows.rs:12:5
2430 |
2531LL | &&42;
26- | ^^^^ help: use `let _ = ...` to ignore it: `let _ = &&42`
32+ | ^^^^ the borrow produces a value
33+ |
34+ help: use `let _ = ...` to ignore the resulting value
2735 |
28- = note: the borrow produces a value
36+ LL | let _ = &&42;
37+ | ^^^^^^^
2938
3039error: unused borrow that must be used
3140 --> $DIR/unused-borrows.rs:15:5
3241 |
3342LL | &&mut 42;
34- | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = &&mut 42`
43+ | ^^^^^^^^ the borrow produces a value
3544 |
36- = note: the borrow produces a value
45+ help: use `let _ = ...` to ignore the resulting value
46+ |
47+ LL | let _ = &&mut 42;
48+ | ^^^^^^^
3749
3850error: unused borrow that must be used
3951 --> $DIR/unused-borrows.rs:18:5
4052 |
4153LL | &mut &42;
42- | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = &mut &42`
54+ | ^^^^^^^^ the borrow produces a value
55+ |
56+ help: use `let _ = ...` to ignore the resulting value
4357 |
44- = note: the borrow produces a value
58+ LL | let _ = &mut &42;
59+ | ^^^^^^^
4560
4661error: unused borrow that must be used
4762 --> $DIR/unused-borrows.rs:23:5
4863 |
4964LL | && foo(42);
50- | ^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = && foo(42)`
65+ | ^^^^^^^^^^ the borrow produces a value
66+ |
67+ help: use `let _ = ...` to ignore the resulting value
5168 |
52- = note: the borrow produces a value
69+ LL | let _ = && foo(42);
70+ | ^^^^^^^
5371
5472error: aborting due to 6 previous errors
5573
0 commit comments