]> 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 2eaba1c408a130d0d1846ade9b977b231fed9d67..856771596202efb47f1c755759ccf60040133d00 100644 (file)
@@ -1,12 +1,3 @@
-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 // run-rustfix
 
 #![warn(clippy::useless_vec)]
@@ -61,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);
+    }
 }