3 // Test that when instantiating trait default methods, typeck handles
4 // lifetime parameters defined on the method bound correctly.
8 fn bar<'a, I: Iterator<Item=&'a ()>>(&self, it: I) -> usize {
9 let mut xs = it.filter(|_| true);
17 // When instantiating `Foo::bar` for `Baz` here, typeck used to
18 // ICE due to the lifetime parameter of `bar`.
23 let y = vec![(), (), ()];
24 assert_eq!(x.bar(y.iter()), 3);