1 error[E0521]: borrowed data escapes outside of function
2 --> $DIR/hrtb-implied-2.rs:18:17
4 LL | fn fails<I: LendingIterator, F>(iter: &mut I, f: F) -> bool
5 | ---- - let's call the lifetime of this reference `'1`
7 | `iter` is a reference that is only valid in the function body
9 LL | let _next = iter2.next();
12 | `iter` escapes the function body here
13 | argument requires that `'1` must outlive `'static`
15 = note: requirement occurs because of a mutable reference to `Eat<&mut I, F>`
16 = note: mutable references are invariant over their type parameter
17 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
18 = note: due to current limitations in the borrow checker, this implies a `'static` lifetime
20 error: aborting due to previous error
22 For more information about this error, try `rustc --explain E0521`.