]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/box_collection.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / box_collection.rs
index 690ed905cdd687cc9fb4d7f71b17eecf1d42220c..4c9947b9ae724d0bcd9b9fe6afefc7b83dc65734 100644 (file)
@@ -1,5 +1,10 @@
 #![warn(clippy::all)]
-#![allow(clippy::boxed_local, clippy::needless_pass_by_value, clippy::disallowed_name, unused)]
+#![allow(
+    clippy::boxed_local,
+    clippy::needless_pass_by_value,
+    clippy::disallowed_names,
+    unused
+)]
 
 use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
 
@@ -10,7 +15,7 @@ macro_rules! boxit {
 }
 
 fn test_macro() {
-    boxit!(Vec::new(), Vec<u8>);
+    boxit!(vec![1], Vec<u8>);
 }
 
 fn test1(foo: Box<Vec<bool>>) {}
@@ -45,7 +50,7 @@ fn test_local_not_linted() {
 pub fn pub_test(foo: Box<Vec<bool>>) {}
 
 pub fn pub_test_ret() -> Box<Vec<bool>> {
-    Box::new(Vec::new())
+    Box::default()
 }
 
 fn main() {}