blob: f313de44bb273b64cc5c61b7ad91fabd3f267661 [file] [edit]
error: an array of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:30:5
|
LL | [0..200];
| ^^^^^^^^
|
= note: `-D clippy::single-range-in-vec-init` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_range_in_vec_init)]`
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0..200];
LL + std::vec::Vec::<i32>::from_iter(0..200);
|
help: if you wanted an array of len 200, try
|
LL - [0..200];
LL + [0; 200];
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:32:5
|
LL | vec![0..200];
| ^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0..200];
LL + std::vec::Vec::<i32>::from_iter(0..200);
|
help: if you wanted a `Vec` of len 200, try
|
LL - vec![0..200];
LL + vec![0; 200];
|
error: an array of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:34:5
|
LL | [0u8..200];
| ^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0u8..200];
LL + std::vec::Vec::<u8>::from_iter(0u8..200);
|
help: if you wanted an array of len 200, try
|
LL - [0u8..200];
LL + [0u8; 200];
|
error: an array of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:36:5
|
LL | [0usize..200];
| ^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0usize..200];
LL + std::vec::Vec::<usize>::from_iter(0usize..200);
|
help: if you wanted an array of len 200, try
|
LL - [0usize..200];
LL + [0usize; 200];
|
error: an array of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:38:5
|
LL | [0..200usize];
| ^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0..200usize];
LL + std::vec::Vec::<usize>::from_iter(0..200usize);
|
help: if you wanted an array of len 200usize, try
|
LL - [0..200usize];
LL + [0; 200usize];
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:40:5
|
LL | vec![0u8..200];
| ^^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0u8..200];
LL + std::vec::Vec::<u8>::from_iter(0u8..200);
|
help: if you wanted a `Vec` of len 200, try
|
LL - vec![0u8..200];
LL + vec![0u8; 200];
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:42:5
|
LL | vec![0usize..200];
| ^^^^^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0usize..200];
LL + std::vec::Vec::<usize>::from_iter(0usize..200);
|
help: if you wanted a `Vec` of len 200, try
|
LL - vec![0usize..200];
LL + vec![0usize; 200];
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:44:5
|
LL | vec![0..200usize];
| ^^^^^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0..200usize];
LL + std::vec::Vec::<usize>::from_iter(0..200usize);
|
help: if you wanted a `Vec` of len 200usize, try
|
LL - vec![0..200usize];
LL + vec![0; 200usize];
|
error: an array of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:47:5
|
LL | [0..200isize];
| ^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0..200isize];
LL + std::vec::Vec::<isize>::from_iter(0..200isize);
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:49:5
|
LL | vec![0..200isize];
| ^^^^^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0..200isize];
LL + std::vec::Vec::<isize>::from_iter(0..200isize);
|
error: a `Vec` of `Range` that is only one element
--> tests/ui/single_range_in_vec_init.rs:88:17
|
LL | let input = vec![0..as_i32!(10)];
| ^^^^^^^^^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - let input = vec![0..as_i32!(10)];
LL + let input = std::vec::Vec::<i32>::from_iter(0..as_i32!(10));
|
error: an array of `RangeInclusive` that is only one element
--> tests/ui/single_range_in_vec_init.rs:93:5
|
LL | [0..=10];
| ^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - [0..=10];
LL + std::vec::Vec::<i32>::from_iter(0..=10);
|
error: a `Vec` of `RangeInclusive` that is only one element
--> tests/ui/single_range_in_vec_init.rs:95:5
|
LL | vec![0..=10];
| ^^^^^^^^^^^^
|
help: if you wanted a `Vec` that contains the entire range, try
|
LL - vec![0..=10];
LL + std::vec::Vec::<i32>::from_iter(0..=10);
|
error: aborting due to 13 previous errors