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