@@ -2,54 +2,72 @@ error: unused borrow that must be used
2
2
--> $DIR/unused-borrows.rs:6:5
3
3
|
4
4
LL | &42;
5
- | ^^^ help: use `let _ = ...` to ignore it: `let _ = &42`
5
+ | ^^^ the borrow produces a value
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/unused-borrows.rs:1:9
9
9
|
10
10
LL | #![deny(unused_must_use)]
11
11
| ^^^^^^^^^^^^^^^
12
- = note: the borrow produces a value
12
+ help: use `let _ = ...` to ignore the resulting value
13
+ |
14
+ LL | let _ = &42;
15
+ | ^^^^^^^
13
16
14
17
error: unused borrow that must be used
15
18
--> $DIR/unused-borrows.rs:9:5
16
19
|
17
20
LL | &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
19
24
|
20
- = note: the borrow produces a value
25
+ LL | let _ = &mut foo(42);
26
+ | ^^^^^^^
21
27
22
28
error: unused borrow that must be used
23
29
--> $DIR/unused-borrows.rs:12:5
24
30
|
25
31
LL | &&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
27
35
|
28
- = note: the borrow produces a value
36
+ LL | let _ = &&42;
37
+ | ^^^^^^^
29
38
30
39
error: unused borrow that must be used
31
40
--> $DIR/unused-borrows.rs:15:5
32
41
|
33
42
LL | &&mut 42;
34
- | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = &&mut 42`
43
+ | ^^^^^^^^ the borrow produces a value
35
44
|
36
- = note: the borrow produces a value
45
+ help: use `let _ = ...` to ignore the resulting value
46
+ |
47
+ LL | let _ = &&mut 42;
48
+ | ^^^^^^^
37
49
38
50
error: unused borrow that must be used
39
51
--> $DIR/unused-borrows.rs:18:5
40
52
|
41
53
LL | &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
43
57
|
44
- = note: the borrow produces a value
58
+ LL | let _ = &mut &42;
59
+ | ^^^^^^^
45
60
46
61
error: unused borrow that must be used
47
62
--> $DIR/unused-borrows.rs:23:5
48
63
|
49
64
LL | && 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
51
68
|
52
- = note: the borrow produces a value
69
+ LL | let _ = && foo(42);
70
+ | ^^^^^^^
53
71
54
72
error: aborting due to 6 previous errors
55
73
0 commit comments