Files
rust/tests/ui/impl-trait/precise-capturing/higher-ranked.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
292 B
Rust
Raw Normal View History

//@ 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<()>;
}
2024-06-05 16:18:52 -04:00
fn hello() -> impl for<'a> Trait<'a, Item = impl IntoIterator + use<>> {}
2024-04-04 12:54:56 -04:00
fn main() {}