2022-06-30 08:50:09 +00:00
|
|
|
error: `std::iter::empty()` is the more idiomatic way
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/default_instead_of_iter_empty.rs:12:13
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::iter::Empty::<usize>::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::empty::<usize>()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::default-instead-of-iter-empty` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::default_instead_of_iter_empty)]`
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
error: `std::iter::empty()` is the more idiomatic way
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/default_instead_of_iter_empty.rs:13:13
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
|
LL | let _ = std::iter::Empty::<HashMap<usize, usize>>::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::empty::<HashMap<usize, usize>>()`
|
|
|
|
|
|
|
|
error: `std::iter::empty()` is the more idiomatic way
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/default_instead_of_iter_empty.rs:14:41
|
2022-06-30 08:50:09 +00:00
|
|
|
|
|
|
|
|
LL | let _foo: std::iter::Empty<usize> = std::iter::Empty::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|