Skip to content

Commit b6d56c4

Browse files
committed
add no-rustfix since suggestions are invalid
1 parent 67bb503 commit b6d56c4

File tree

3 files changed

+11
-94
lines changed

3 files changed

+11
-94
lines changed

tests/ui/vec_box_sized.fixed

Lines changed: 0 additions & 85 deletions
This file was deleted.

tests/ui/vec_box_sized.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@no-rustfix
2+
13
#![allow(dead_code)]
24
#![feature(allocator_api)]
35

tests/ui/vec_box_sized.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `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
|
44
LL | 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

1010
error: `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
|
1313
LL | static S: Vec<Box<i32>> = Vec::new();
1414
| ^^^^^^^^^^^^^ help: try: `Vec<i32>`
1515

1616
error: `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
|
1919
LL | sized_type: Vec<Box<SizedStruct>>,
2020
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
2121

2222
error: `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
|
2525
LL | struct A(Vec<Box<SizedStruct>>);
2626
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
2727

2828
error: `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
|
3131
LL | struct B(Vec<Vec<Box<(u32)>>>);
3232
| ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
3333

3434
error: `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
|
3737
LL | fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
3838
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
3939

4040
error: `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
|
4343
LL | fn allocator_global_defined_box() -> Vec<Box<i32, std::alloc::Global>> {
4444
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
4545

4646
error: `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
|
4949
LL | fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
5050
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
5151

5252
error: `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
|
5555
LL | pub fn f() -> Vec<Box<S>> {
5656
| ^^^^^^^^^^^ help: try: `Vec<S>`

0 commit comments

Comments
 (0)