2021-09-28 17:03:12 +00:00
|
|
|
error: you seem to be trying to use `Box<Vec<..>>`. Consider using just `Vec<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:21:15
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
LL | fn test1(foo: Box<Vec<bool>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
|
= help: `Vec<..>` is already on the heap, `Box<Vec<..>>` makes an extra allocation
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::box-collection` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::box_collection)]`
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<String>`. Consider using just `String`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:29:15
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
|
LL | fn test3(foo: Box<String>) {}
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `String` is already on the heap, `Box<String>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<HashMap<..>>`. Consider using just `HashMap<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:32:15
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
|
LL | fn test4(foo: Box<HashMap<String, String>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `HashMap<..>` is already on the heap, `Box<HashMap<..>>` makes an extra allocation
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
error: you seem to be trying to use `Box<HashSet<..>>`. Consider using just `HashSet<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:35:15
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test5(foo: Box<HashSet<i64>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `HashSet<..>` is already on the heap, `Box<HashSet<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<VecDeque<..>>`. Consider using just `VecDeque<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:38:15
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test6(foo: Box<VecDeque<i32>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `VecDeque<..>` is already on the heap, `Box<VecDeque<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<LinkedList<..>>`. Consider using just `LinkedList<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:41:15
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test7(foo: Box<LinkedList<i16>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `LinkedList<..>` is already on the heap, `Box<LinkedList<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<BTreeMap<..>>`. Consider using just `BTreeMap<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:44:15
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test8(foo: Box<BTreeMap<i8, String>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `BTreeMap<..>` is already on the heap, `Box<BTreeMap<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<BTreeSet<..>>`. Consider using just `BTreeSet<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:47:15
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test9(foo: Box<BTreeSet<u64>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `BTreeSet<..>` is already on the heap, `Box<BTreeSet<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: you seem to be trying to use `Box<BinaryHeap<..>>`. Consider using just `BinaryHeap<..>`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/box_collection.rs:50:16
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | fn test10(foo: Box<BinaryHeap<u32>>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `BinaryHeap<..>` is already on the heap, `Box<BinaryHeap<..>>` makes an extra allocation
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2021-09-28 17:03:12 +00:00
|
|
|
|