]> git.lizzy.rs Git - rust.git/blob - tests/ui/vec_box_sized.stderr
`assertions_on_result_states` fix suggestion when `assert!` not in a statement
[rust.git] / tests / ui / vec_box_sized.stderr
1 error: `Vec<T>` is already on the heap, the boxing is unnecessary
2   --> $DIR/vec_box_sized.rs:12:14
3    |
4 LL |     const C: Vec<Box<i32>> = Vec::new();
5    |              ^^^^^^^^^^^^^ help: try: `Vec<i32>`
6    |
7    = note: `-D clippy::vec-box` implied by `-D warnings`
8
9 error: `Vec<T>` is already on the heap, the boxing is unnecessary
10   --> $DIR/vec_box_sized.rs:13:15
11    |
12 LL |     static S: Vec<Box<i32>> = Vec::new();
13    |               ^^^^^^^^^^^^^ help: try: `Vec<i32>`
14
15 error: `Vec<T>` is already on the heap, the boxing is unnecessary
16   --> $DIR/vec_box_sized.rs:16:21
17    |
18 LL |         sized_type: Vec<Box<SizedStruct>>,
19    |                     ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
20
21 error: `Vec<T>` is already on the heap, the boxing is unnecessary
22   --> $DIR/vec_box_sized.rs:19:14
23    |
24 LL |     struct A(Vec<Box<SizedStruct>>);
25    |              ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
26
27 error: `Vec<T>` is already on the heap, the boxing is unnecessary
28   --> $DIR/vec_box_sized.rs:20:18
29    |
30 LL |     struct B(Vec<Vec<Box<(u32)>>>);
31    |                  ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
32
33 error: `Vec<T>` is already on the heap, the boxing is unnecessary
34   --> $DIR/vec_box_sized.rs:48:23
35    |
36 LL |         pub fn f() -> Vec<Box<S>> {
37    |                       ^^^^^^^^^^^ help: try: `Vec<S>`
38
39 error: aborting due to 6 previous errors
40