blob: 7d7a084b89046ca64f759f3c455cd7ac8c0ee6e1 [file] [log] [blame]
// Check that nested impl Trait items work in functions with generic parameters.
// check-pass
trait Captures<'a> {}
impl<T> Captures<'_> for T {}
fn nested_assoc_type<'a: 'a, T>() -> impl Iterator<Item = impl Sized> {
[1].iter()
}
fn nested_assoc_lifetime<'a: 'a, T>() -> impl Iterator<Item = impl Captures<'a>> {
[1].iter()
}
fn main() {}