mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
21 lines
568 B
Rust
21 lines
568 B
Rust
#![feature(rustc_attrs)]
|
|
#![allow(internal_features)]
|
|
#![rustc_variance_of_opaques]
|
|
|
|
trait Captures<'a> {}
|
|
impl<T> Captures<'_> for T {}
|
|
|
|
trait Foo<'i> {
|
|
fn implicit_capture_early<'a: 'a>() -> impl Sized {}
|
|
//~^ [o, *, *, o, o]
|
|
// Self, 'i, 'a, 'i_duplicated, 'a_duplicated
|
|
|
|
fn explicit_capture_early<'a: 'a>() -> impl Sized + Captures<'a> {} //~ [o, *, *, o, o]
|
|
|
|
fn implicit_capture_late<'a>(_: &'a ()) -> impl Sized {} //~ [o, *, o, o]
|
|
|
|
fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} //~ [o, *, o, o]
|
|
}
|
|
|
|
fn main() {}
|