rust/tests/ui/single_range_in_vec_init.stderr

146 lines
4.1 KiB
Plaintext
Raw Normal View History

2023-06-12 11:09:52 -05:00
error: an array of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:26:5
2023-06-12 11:09:52 -05:00
|
LL | [0..200];
| ^^^^^^^^
|
= note: `-D clippy::single-range-in-vec-init` implied by `-D warnings`
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200).collect::<std::vec::Vec<i32>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 200, try
|
LL | [0; 200];
| ~~~~~~
error: a `Vec` of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:27:5
2023-06-12 11:09:52 -05:00
|
LL | vec![0..200];
| ^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200).collect::<std::vec::Vec<i32>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted a `Vec` of len 200, try
|
LL | vec![0; 200];
| ~~~~~~
error: an array of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:28:5
2023-06-12 11:09:52 -05:00
|
LL | [0u8..200];
| ^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0u8..200).collect::<std::vec::Vec<u8>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 200, try
|
LL | [0u8; 200];
| ~~~~~~~~
error: an array of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:29:5
2023-06-12 11:09:52 -05:00
|
LL | [0usize..200];
| ^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0usize..200).collect::<std::vec::Vec<usize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 200, try
|
LL | [0usize; 200];
| ~~~~~~~~~~~
error: an array of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:30:5
2023-06-12 11:09:52 -05:00
|
LL | [0..200usize];
| ^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200usize).collect::<std::vec::Vec<usize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 200usize, try
|
LL | [0; 200usize];
| ~~~~~~~~~~~
error: a `Vec` of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:31:5
2023-06-12 11:09:52 -05:00
|
LL | vec![0u8..200];
| ^^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0u8..200).collect::<std::vec::Vec<u8>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted a `Vec` of len 200, try
|
LL | vec![0u8; 200];
| ~~~~~~~~
error: a `Vec` of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:32:5
2023-06-12 11:09:52 -05:00
|
LL | vec![0usize..200];
| ^^^^^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0usize..200).collect::<std::vec::Vec<usize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted a `Vec` of len 200, try
|
LL | vec![0usize; 200];
| ~~~~~~~~~~~
error: a `Vec` of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:33:5
2023-06-12 11:09:52 -05:00
|
LL | vec![0..200usize];
| ^^^^^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200usize).collect::<std::vec::Vec<usize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted a `Vec` of len 200usize, try
|
LL | vec![0; 200usize];
| ~~~~~~~~~~~
error: an array of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:35:5
2023-06-12 11:09:52 -05:00
|
LL | [0..200isize];
| ^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200isize).collect::<std::vec::Vec<isize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: a `Vec` of `Range` that is only one element
2023-07-27 06:40:22 -05:00
--> $DIR/single_range_in_vec_init.rs:36:5
2023-06-12 11:09:52 -05:00
|
LL | vec![0..200isize];
| ^^^^^^^^^^^^^^^^^
|
2023-06-12 12:55:31 -05:00
help: if you wanted a `Vec` that contains the entire range, try
2023-06-12 11:09:52 -05:00
|
LL | (0..200isize).collect::<std::vec::Vec<isize>>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 10 previous errors