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

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

#![feature(lifetime_capture_rules_2024, precise_capturing)]
//~^ WARN the feature `precise_capturing` is incomplete

trait Trait<'a> {
    type Item;
}

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

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

fn main() {}