mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
29 lines
865 B
Text
29 lines
865 B
Text
error: accessing first element with `x.get(0)`
|
|
--> $DIR/get_first.rs:17:13
|
|
|
|
|
LL | let _ = x.get(0);
|
|
| ^^^^^^^^ help: try: `x.first()`
|
|
|
|
|
= note: `-D clippy::get-first` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`
|
|
|
|
error: accessing first element with `y.get(0)`
|
|
--> $DIR/get_first.rs:23:13
|
|
|
|
|
LL | let _ = y.get(0);
|
|
| ^^^^^^^^ help: try: `y.first()`
|
|
|
|
error: accessing first element with `z.get(0)`
|
|
--> $DIR/get_first.rs:29:13
|
|
|
|
|
LL | let _ = z.get(0);
|
|
| ^^^^^^^^ help: try: `z.first()`
|
|
|
|
error: accessing first element with `non_primitives.get(0)`
|
|
--> $DIR/get_first.rs:45:13
|
|
|
|
|
LL | let _ = non_primitives.get(0);
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `non_primitives.first()`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|