Skip to content

Commit da1c65e

Browse files
committed
Fix other lint that now raised
1 parent 7dba655 commit da1c65e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tests/ui/repeat_vec_with_capacity.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::trivial_map_over_range)]
12
#![warn(clippy::repeat_vec_with_capacity)]
23

34
fn main() {

tests/ui/repeat_vec_with_capacity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::trivial_map_over_range)]
12
#![warn(clippy::repeat_vec_with_capacity)]
23

34
fn main() {

tests/ui/repeat_vec_with_capacity.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: repeating `Vec::with_capacity` using `vec![x; n]`, which does not retain capacity
2-
--> tests/ui/repeat_vec_with_capacity.rs:5:9
2+
--> tests/ui/repeat_vec_with_capacity.rs:6:9
33
|
44
LL | vec![Vec::<()>::with_capacity(42); 123];
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | (0..123).map(|_| Vec::<()>::with_capacity(42)).collect::<Vec<_>>();
1313
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1414

1515
error: repeating `Vec::with_capacity` using `vec![x; n]`, which does not retain capacity
16-
--> tests/ui/repeat_vec_with_capacity.rs:11:9
16+
--> tests/ui/repeat_vec_with_capacity.rs:12:9
1717
|
1818
LL | vec![Vec::<()>::with_capacity(42); n];
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL | (0..n).map(|_| Vec::<()>::with_capacity(42)).collect::<Vec<_>>();
2525
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2626

2727
error: repeating `Vec::with_capacity` using `iter::repeat`, which does not retain capacity
28-
--> tests/ui/repeat_vec_with_capacity.rs:26:9
28+
--> tests/ui/repeat_vec_with_capacity.rs:27:9
2929
|
3030
LL | std::iter::repeat(Vec::<()>::with_capacity(42));
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)