mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
17 lines
292 B
Rust
17 lines
292 B
Rust
//@ 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() {}
|