]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/slow_vector_initialization.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / slow_vector_initialization.stderr
CommitLineData
f20569fa
XL
1error: slow zero-filling initialization
2 --> $DIR/slow_vector_initialization.rs:13:5
3 |
4LL | let mut vec1 = Vec::with_capacity(len);
5 | ----------------------- help: consider replace allocation with: `vec![0; len]`
6LL | vec1.extend(repeat(0).take(len));
7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 |
9 = note: `-D clippy::slow-vector-initialization` implied by `-D warnings`
10
11error: slow zero-filling initialization
12 --> $DIR/slow_vector_initialization.rs:17:5
13 |
14LL | let mut vec2 = Vec::with_capacity(len - 10);
15 | ---------------------------- help: consider replace allocation with: `vec![0; len - 10]`
16LL | vec2.extend(repeat(0).take(len - 10));
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19error: slow zero-filling initialization
20 --> $DIR/slow_vector_initialization.rs:31:5
21 |
22LL | let mut resized_vec = Vec::with_capacity(30);
23 | ---------------------- help: consider replace allocation with: `vec![0; 30]`
24LL | resized_vec.resize(30, 0);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^
26
27error: slow zero-filling initialization
28 --> $DIR/slow_vector_initialization.rs:34:5
29 |
30LL | let mut extend_vec = Vec::with_capacity(30);
31 | ---------------------- help: consider replace allocation with: `vec![0; 30]`
32LL | extend_vec.extend(repeat(0).take(30));
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35error: slow zero-filling initialization
36 --> $DIR/slow_vector_initialization.rs:41:5
37 |
38LL | let mut vec1 = Vec::with_capacity(len);
39 | ----------------------- help: consider replace allocation with: `vec![0; len]`
40LL | vec1.resize(len, 0);
41 | ^^^^^^^^^^^^^^^^^^^
42
43error: slow zero-filling initialization
44 --> $DIR/slow_vector_initialization.rs:49:5
45 |
46LL | let mut vec3 = Vec::with_capacity(len - 10);
47 | ---------------------------- help: consider replace allocation with: `vec![0; len - 10]`
48LL | vec3.resize(len - 10, 0);
49 | ^^^^^^^^^^^^^^^^^^^^^^^^
50
51error: slow zero-filling initialization
52 --> $DIR/slow_vector_initialization.rs:53:5
53 |
54LL | vec1 = Vec::with_capacity(10);
55 | ---------------------- help: consider replace allocation with: `vec![0; 10]`
56LL | vec1.resize(10, 0);
57 | ^^^^^^^^^^^^^^^^^^
58
59error: aborting due to 7 previous errors
60