From: Lzu Tao Date: Wed, 25 Sep 2019 04:06:52 +0000 (+0700) Subject: Add regression test for macro expansion X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;ds=sidebyside;h=3b9e5dfda565224e6f007f379ca1cea4623422d9;p=rust.git Add regression test for macro expansion --- diff --git a/tests/ui/toplevel_ref_arg.rs b/tests/ui/toplevel_ref_arg.rs index 7d5eaa940e1..e11c40966e4 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;