4 fn the_answer(ref mut x: u8) {
11 // Closures should not warn
12 let y = |ref x| println!("{:?}", x);
17 let ref y: (&_, u8) = (&1, 2);
21 let ref mut z = 1 + 2;
23 let (ref x, _) = (1, 2); // ok, not top level
24 println!("The answer is {}.", x);
26 // Make sure that allowing the lint works
27 #[allow(clippy::toplevel_ref_arg)]
28 let ref mut x = 1_234_543;