about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/higher-ranked.rs
blob: 925f03589e8942fd66b3ffdb1e4c11f81330b23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ check-pass
//@ edition: 2024

// Show how precise captures allow us to skip capturing a higher-ranked lifetime

trait Trait<'a> {
    type Item;
}

impl Trait<'_> for () {
    type Item = Vec<()>;
}

fn hello() -> impl for<'a> Trait<'a, Item = impl IntoIterator + use<>> {}

fn main() {}