rust/tests/ui/iter_empty.stderr

41 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-07-19 15:08:03 -05:00
error: `into_iter` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:6:16
|
LL | assert_eq!([].into_iter().next(), Option::<i32>::None);
| ^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
|
= note: `-D clippy::iter-empty` implied by `-D warnings`
2022-07-19 15:08:03 -05:00
error: `iter_mut` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:7:16
|
LL | assert_eq!([].iter_mut().next(), Option::<&mut i32>::None);
| ^^^^^^^^^^^^^ help: try: `std::iter::empty()`
2022-07-19 15:08:03 -05:00
error: `iter` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:8:16
|
LL | assert_eq!([].iter().next(), Option::<&i32>::None);
| ^^^^^^^^^ help: try: `std::iter::empty()`
2022-07-19 15:08:03 -05:00
error: `into_iter` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:9:16
|
LL | assert_eq!(None.into_iter().next(), Option::<i32>::None);
| ^^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
2022-07-19 15:08:03 -05:00
error: `iter_mut` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:10:16
|
LL | assert_eq!(None.iter_mut().next(), Option::<&mut i32>::None);
| ^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
2022-07-19 15:08:03 -05:00
error: `iter` call on an empty collection
2022-07-16 03:22:43 -05:00
--> $DIR/iter_empty.rs:11:16
|
LL | assert_eq!(None.iter().next(), Option::<&i32>::None);
| ^^^^^^^^^^^ help: try: `std::iter::empty()`
error: aborting due to 6 previous errors