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