From 3b9e5dfda565224e6f007f379ca1cea4623422d9 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 25 Sep 2019 11:06:52 +0700 Subject: [PATCH] Add regression test for macro expansion --- tests/ui/toplevel_ref_arg.rs | 2 ++ 1 file changed, 2 insertions(+) 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;