rust/tests/ui/match_on_vec_items.stderr

53 lines
1.4 KiB
Plaintext
Raw Normal View History

error: indexing into a vector may panic
2023-06-06 15:56:57 -05:00
--> $DIR/match_on_vec_items.rs:10:11
2020-04-23 16:28:18 -05:00
|
LL | match arr[idx] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^ help: try: `arr.get(idx)`
2020-04-23 16:28:18 -05:00
|
2020-04-25 03:33:40 -05:00
= note: `-D clippy::match-on-vec-items` implied by `-D warnings`
2020-04-23 16:28:18 -05:00
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:19:11
2020-04-23 16:28:18 -05:00
|
LL | match arr[range] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^ help: try: `arr.get(range)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:33:11
|
LL | match arr[idx] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^ help: try: `arr.get(idx)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:41:11
|
LL | match arr[range] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^ help: try: `arr.get(range)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:55:11
|
LL | match arr[idx] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^ help: try: `arr.get(idx)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:63:11
|
LL | match arr[range] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^ help: try: `arr.get(range)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:77:11
|
LL | match arr[idx] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^ help: try: `arr.get(idx)`
error: indexing into a vector may panic
--> $DIR/match_on_vec_items.rs:85:11
2020-04-23 16:28:18 -05:00
|
LL | match arr[range] {
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^ help: try: `arr.get(range)`
2020-04-23 16:28:18 -05:00
error: aborting due to 8 previous errors
2020-04-23 16:28:18 -05:00