// check-fail // known-bug: #88382 // This should pass, but has a missed normalization due to HRTB. trait Iterable { type Iterator<'a> where Self: 'a; fn iter(&self) -> Self::Iterator<'_>; } struct SomeImplementation(); impl Iterable for SomeImplementation { type Iterator<'a> = std::iter::Empty; fn iter(&self) -> Self::Iterator<'_> { std::iter::empty() } } fn do_something(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) { f(&mut i.iter()); } fn main() { do_something(SomeImplementation(), |_| ()); do_something(SomeImplementation(), test); } fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {}