]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/vec_init_then_push.stderr
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / tools / clippy / tests / ui / vec_init_then_push.stderr
CommitLineData
f20569fa 1error: calls to `push` immediately after creation
c620b35d 2 --> tests/ui/vec_init_then_push.rs:5:5
f20569fa
XL
3 |
4LL | / let mut def_err: Vec<u32> = Default::default();
781aab86
FG
5LL | |
6LL | |
f20569fa 7LL | | def_err.push(0);
923072b8 8 | |____________________^ help: consider using the `vec![]` macro: `let def_err: Vec<u32> = vec![..];`
f20569fa
XL
9 |
10 = note: `-D clippy::vec-init-then-push` implied by `-D warnings`
781aab86 11 = help: to override `-D warnings` add `#[allow(clippy::vec_init_then_push)]`
f20569fa
XL
12
13error: calls to `push` immediately after creation
c620b35d 14 --> tests/ui/vec_init_then_push.rs:10:5
f20569fa
XL
15 |
16LL | / let mut new_err = Vec::<u32>::new();
781aab86 17LL | |
f20569fa
XL
18LL | | new_err.push(1);
19 | |____________________^ help: consider using the `vec![]` macro: `let mut new_err = vec![..];`
20
21error: calls to `push` immediately after creation
c620b35d 22 --> tests/ui/vec_init_then_push.rs:14:5
f20569fa
XL
23 |
24LL | / let mut cap_err = Vec::with_capacity(2);
781aab86 25LL | |
f20569fa
XL
26LL | | cap_err.push(0);
27LL | | cap_err.push(1);
28LL | | cap_err.push(2);
29 | |____________________^ help: consider using the `vec![]` macro: `let mut cap_err = vec![..];`
30
31error: calls to `push` immediately after creation
c620b35d 32 --> tests/ui/vec_init_then_push.rs:27:5
f20569fa
XL
33 |
34LL | / new_err = Vec::new();
781aab86 35LL | |
f20569fa
XL
36LL | | new_err.push(0);
37 | |____________________^ help: consider using the `vec![]` macro: `new_err = vec![..];`
38
923072b8 39error: calls to `push` immediately after creation
c620b35d 40 --> tests/ui/vec_init_then_push.rs:78:5
923072b8
FG
41 |
42LL | / let mut v = Vec::new();
781aab86 43LL | |
923072b8
FG
44LL | | v.push(x);
45LL | | v.push(1);
46 | |______________^ help: consider using the `vec![]` macro: `let mut v = vec![..];`
47
48error: calls to `push` immediately after creation
c620b35d 49 --> tests/ui/vec_init_then_push.rs:87:5
923072b8
FG
50 |
51LL | / let mut v = Vec::new();
781aab86 52LL | |
923072b8
FG
53LL | | v.push(0);
54LL | | v.push(1);
923072b8
FG
55... |
56LL | | v.push(1);
57LL | | v.push(0);
58 | |______________^ help: consider using the `vec![]` macro: `let mut v = vec![..];`
59
60error: calls to `push` immediately after creation
c620b35d 61 --> tests/ui/vec_init_then_push.rs:101:5
923072b8
FG
62 |
63LL | / let mut v2 = Vec::new();
781aab86 64LL | |
923072b8
FG
65LL | | v2.push(0);
66LL | | v2.push(1);
923072b8
FG
67... |
68LL | | v2.push(1);
69LL | | v2.push(0);
70 | |_______________^ help: consider using the `vec![]` macro: `let mut v2 = vec![..];`
71
064997fb 72error: calls to `push` immediately after creation
c620b35d 73 --> tests/ui/vec_init_then_push.rs:117:5
064997fb
FG
74 |
75LL | / let mut v = Vec::new();
781aab86 76LL | |
064997fb
FG
77LL | | v.push((0i32, 0i32));
78 | |_________________________^ help: consider using the `vec![]` macro: `let v = vec![..];`
79
80error: aborting due to 8 previous errors
f20569fa 81