]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: calls to `push` immediately after creation |
2 | --> $DIR/vec_init_then_push.rs:5:5 | |
3 | | | |
4 | LL | / let mut def_err: Vec<u32> = Default::default(); | |
5 | LL | | def_err.push(0); | |
6 | | |____________________^ help: consider using the `vec![]` macro: `let mut def_err: Vec<u32> = vec![..];` | |
7 | | | |
8 | = note: `-D clippy::vec-init-then-push` implied by `-D warnings` | |
9 | ||
10 | error: calls to `push` immediately after creation | |
11 | --> $DIR/vec_init_then_push.rs:8:5 | |
12 | | | |
13 | LL | / let mut new_err = Vec::<u32>::new(); | |
14 | LL | | new_err.push(1); | |
15 | | |____________________^ help: consider using the `vec![]` macro: `let mut new_err = vec![..];` | |
16 | ||
17 | error: calls to `push` immediately after creation | |
18 | --> $DIR/vec_init_then_push.rs:11:5 | |
19 | | | |
20 | LL | / let mut cap_err = Vec::with_capacity(2); | |
21 | LL | | cap_err.push(0); | |
22 | LL | | cap_err.push(1); | |
23 | LL | | cap_err.push(2); | |
24 | | |____________________^ help: consider using the `vec![]` macro: `let mut cap_err = vec![..];` | |
25 | ||
26 | error: calls to `push` immediately after creation | |
27 | --> $DIR/vec_init_then_push.rs:23:5 | |
28 | | | |
29 | LL | / new_err = Vec::new(); | |
30 | LL | | new_err.push(0); | |
31 | | |____________________^ help: consider using the `vec![]` macro: `new_err = vec![..];` | |
32 | ||
33 | error: aborting due to 4 previous errors | |
34 |