2024-04-03 20:54:23 -04:00
|
|
|
//@ check-pass
|
2025-02-09 19:09:43 +00:00
|
|
|
//@ edition: 2024
|
2024-04-03 20:54:23 -04:00
|
|
|
|
|
|
|
|
// 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-03 20:54:23 -04:00
|
|
|
|
2024-04-04 12:54:56 -04:00
|
|
|
fn main() {}
|