mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
18 lines
388 B
Rust
18 lines
388 B
Rust
![]() |
//@ 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() {}
|