11error: `Vec<T>` is already on the heap, the boxing is unnecessary
2- --> $DIR/vec_box_sized.rs:24 :14
2+ --> $DIR/vec_box_sized.rs:26 :14
33 |
44LL | const C: Vec<Box<i32>> = Vec::new();
55 | ^^^^^^^^^^^^^ help: try: `Vec<i32>`
@@ -8,49 +8,49 @@ LL | const C: Vec<Box<i32>> = Vec::new();
88 = help: to override `-D warnings` add `#[allow(clippy::vec_box)]`
99
1010error: `Vec<T>` is already on the heap, the boxing is unnecessary
11- --> $DIR/vec_box_sized.rs:25 :15
11+ --> $DIR/vec_box_sized.rs:27 :15
1212 |
1313LL | static S: Vec<Box<i32>> = Vec::new();
1414 | ^^^^^^^^^^^^^ help: try: `Vec<i32>`
1515
1616error: `Vec<T>` is already on the heap, the boxing is unnecessary
17- --> $DIR/vec_box_sized.rs:28 :21
17+ --> $DIR/vec_box_sized.rs:30 :21
1818 |
1919LL | sized_type: Vec<Box<SizedStruct>>,
2020 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
2121
2222error: `Vec<T>` is already on the heap, the boxing is unnecessary
23- --> $DIR/vec_box_sized.rs:31 :14
23+ --> $DIR/vec_box_sized.rs:33 :14
2424 |
2525LL | struct A(Vec<Box<SizedStruct>>);
2626 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
2727
2828error: `Vec<T>` is already on the heap, the boxing is unnecessary
29- --> $DIR/vec_box_sized.rs:32 :18
29+ --> $DIR/vec_box_sized.rs:34 :18
3030 |
3131LL | struct B(Vec<Vec<Box<(u32)>>>);
3232 | ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
3333
3434error: `Vec<T>` is already on the heap, the boxing is unnecessary
35- --> $DIR/vec_box_sized.rs:34 :42
35+ --> $DIR/vec_box_sized.rs:36 :42
3636 |
3737LL | fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
3939
4040error: `Vec<T>` is already on the heap, the boxing is unnecessary
41- --> $DIR/vec_box_sized.rs:37 :42
41+ --> $DIR/vec_box_sized.rs:39 :42
4242 |
4343LL | fn allocator_global_defined_box() -> Vec<Box<i32, std::alloc::Global>> {
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
4545
4646error: `Vec<T>` is already on the heap, the boxing is unnecessary
47- --> $DIR/vec_box_sized.rs:40 :29
47+ --> $DIR/vec_box_sized.rs:42 :29
4848 |
4949LL | fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
5151
5252error: `Vec<T>` is already on the heap, the boxing is unnecessary
53- --> $DIR/vec_box_sized.rs:74 :23
53+ --> $DIR/vec_box_sized.rs:76 :23
5454 |
5555LL | pub fn f() -> Vec<Box<S>> {
5656 | ^^^^^^^^^^^ help: try: `Vec<S>`
0 commit comments