]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/vec.fixed
Auto merge of #6336 - giraffate:sync-from-rust, r=flip1995
[rust.git] / tests / ui / vec.fixed
index e73a791891f890664cf3eddc2f60b63040c4e995..856771596202efb47f1c755759ccf60040133d00 100644 (file)
@@ -52,4 +52,11 @@ fn main() {
     for a in vec![NonCopy, NonCopy] {
         println!("{:?}", a);
     }
+
+    on_vec(&vec![1; 201]); // Ok, size of `vec` higher than `too_large_for_stack`
+
+    // Ok
+    for a in vec![1; 201] {
+        println!("{:?}", a);
+    }
 }