| error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator |
| --> tests/ui/double_ended_iterator_last_unfixable.rs:36:36 |
| | |
| LL | println!("Last element is {}", v.0.last().unwrap().0); |
| | ^^^^------ |
| | | |
| | help: try: `next_back()` |
| | |
| = note: this change will alter drop order which may be undesirable |
| note: this must be made mutable to use `.next_back()` |
| --> tests/ui/double_ended_iterator_last_unfixable.rs:36:36 |
| | |
| LL | println!("Last element is {}", v.0.last().unwrap().0); |
| | ^^^ |
| = note: `-D clippy::double-ended-iterator-last` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::double_ended_iterator_last)]` |
| |
| error: aborting due to 1 previous error |
| |