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

18 lines
316 B
Rust
Raw Normal View History

//@ check-pass
// Show how precise captures allow us to skip capturing a higher-ranked lifetime
#![feature(lifetime_capture_rules_2024)]
trait Trait<'a> {
type Item;
}
impl Trait<'_> for () {
type Item = Vec<()>;
}
2024-06-05 15:18:52 -05:00
fn hello() -> impl for<'a> Trait<'a, Item = impl IntoIterator + use<>> {}
2024-04-04 11:54:56 -05:00
fn main() {}