3 #![warn(clippy::toplevel_ref_arg)]
7 // Closures should not warn
8 let y = |ref x| println!("{:?}", x);
13 let y: &(&_, u8) = &(&1, 2);
19 let (ref x, _) = (1, 2); // ok, not top level
20 println!("The answer is {}.", x);
22 // Make sure that allowing the lint works
23 #[allow(clippy::toplevel_ref_arg)]
24 let ref mut x = 1_234_543;