fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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