diff --git a/tests/ui/toplevel_ref_arg.rs b/tests/ui/toplevel_ref_arg.rs index 7d5eaa940..e11c40966 100644 --- a/tests/ui/toplevel_ref_arg.rs +++ b/tests/ui/toplevel_ref_arg.rs @@ -19,6 +19,8 @@ fn main() { let (ref x, _) = (1, 2); // ok, not top level println!("The answer is {}.", x); + let ref x = vec![1, 2, 3]; + // Make sure that allowing the lint works #[allow(clippy::toplevel_ref_arg)] let ref mut x = 1_234_543;