1 pub trait LendingIterator {
6 fn consume<F>(self, _f: F)
9 for<'a> Self::Item<'a>: FuncInput<'a, Self::Item<'a>>,
14 impl<I: LendingIterator + ?Sized> LendingIterator for &mut I {
15 type Item<'a> = I::Item<'a> where Self: 'a;
18 impl LendingIterator for EmptyIter {
19 type Item<'a> = &'a mut () where Self:'a;
21 pub trait FuncInput<'a, F>
27 impl<'a, T, F: 'a> FuncInput<'a, F> for T where F: Foo<T> {}
31 (&mut EmptyIter).consume(());
32 //~^ ERROR the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satisfied