]> git.lizzy.rs Git - rust.git/commitdiff
Add regression test for macro expansion
authorLzu Tao <taolzu@gmail.com>
Wed, 25 Sep 2019 04:06:52 +0000 (11:06 +0700)
committerLzu Tao <taolzu@gmail.com>
Thu, 26 Sep 2019 01:14:58 +0000 (08:14 +0700)
tests/ui/toplevel_ref_arg.rs

index 7d5eaa940e1e1e75924243c635578d3ab73bfcfb..e11c40966e4b062827f61a4783bee584c53cedd4 100644 (file)
@@ -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;