2022-06-04 11:34:07 +00:00
|
|
|
error: accessing first element with `x.get(0)`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/get_first.rs:17:13
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
2023-10-04 16:07:54 +00:00
|
|
|
LL | let _ = x.get(0);
|
2022-06-04 11:34:07 +00:00
|
|
|
| ^^^^^^^^ help: try: `x.first()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::get-first` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
|
|
error: accessing first element with `y.get(0)`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/get_first.rs:23:13
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
2023-10-04 16:07:54 +00:00
|
|
|
LL | let _ = y.get(0);
|
2022-06-04 11:34:07 +00:00
|
|
|
| ^^^^^^^^ help: try: `y.first()`
|
|
|
|
|
|
|
|
error: accessing first element with `z.get(0)`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/get_first.rs:29:13
|
2022-06-04 11:34:07 +00:00
|
|
|
|
|
2023-10-04 16:07:54 +00:00
|
|
|
LL | let _ = z.get(0);
|
2022-06-04 11:34:07 +00:00
|
|
|
| ^^^^^^^^ help: try: `z.first()`
|
|
|
|
|
2023-11-01 22:26:43 +00:00
|
|
|
error: accessing first element with `vecdeque.get(0)`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/get_first.rs:35:13
|
2023-11-01 22:26:43 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vecdeque.get(0);
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `vecdeque.front()`
|
|
|
|
|
2023-10-04 16:07:54 +00:00
|
|
|
error: accessing first element with `non_primitives.get(0)`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/get_first.rs:48:13
|
2023-10-04 16:07:54 +00:00
|
|
|
|
|
|
|
|
LL | let _ = non_primitives.get(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `non_primitives.first()`
|
|
|
|
|
2023-11-01 22:26:43 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2022-06-04 11:34:07 +00:00
|
|
|
|