|
1 |
| -error: `ref` directly on a function argument is ignored. Consider using a reference type instead. |
2 |
| - --> $DIR/toplevel_ref_arg.rs:4:15 |
3 |
| - | |
4 |
| -LL | fn the_answer(ref mut x: u8) { |
5 |
| - | ^^^^^^^^^ |
6 |
| - | |
7 |
| - = note: `-D clippy::toplevel-ref-arg` implied by `-D warnings` |
8 |
| - |
9 | 1 | error: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
|
10 |
| - --> $DIR/toplevel_ref_arg.rs:15:9 |
| 2 | + --> $DIR/toplevel_ref_arg.rs:11:9 |
11 | 3 | |
|
12 | 4 | LL | let ref x = 1;
|
13 | 5 | | ----^^^^^----- help: try: `let x = &1;`
|
| 6 | + | |
| 7 | + = note: `-D clippy::toplevel-ref-arg` implied by `-D warnings` |
14 | 8 |
|
15 | 9 | error: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
|
16 |
| - --> $DIR/toplevel_ref_arg.rs:17:9 |
| 10 | + --> $DIR/toplevel_ref_arg.rs:13:9 |
17 | 11 | |
|
18 | 12 | LL | let ref y: (&_, u8) = (&1, 2);
|
19 | 13 | | ----^^^^^--------------------- help: try: `let y: &(&_, u8) = &(&1, 2);`
|
20 | 14 |
|
21 | 15 | error: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
|
22 |
| - --> $DIR/toplevel_ref_arg.rs:19:9 |
| 16 | + --> $DIR/toplevel_ref_arg.rs:15:9 |
23 | 17 | |
|
24 | 18 | LL | let ref z = 1 + 2;
|
25 | 19 | | ----^^^^^--------- help: try: `let z = &(1 + 2);`
|
26 | 20 |
|
27 | 21 | error: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
|
28 |
| - --> $DIR/toplevel_ref_arg.rs:21:9 |
| 22 | + --> $DIR/toplevel_ref_arg.rs:17:9 |
29 | 23 | |
|
30 | 24 | LL | let ref mut z = 1 + 2;
|
31 | 25 | | ----^^^^^^^^^--------- help: try: `let z = &mut (1 + 2);`
|
32 | 26 |
|
33 |
| -error: aborting due to 5 previous errors |
| 27 | +error: aborting due to 4 previous errors |
34 | 28 |
|
0 commit comments