mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
10 lines
278 B
Rust
10 lines
278 B
Rust
// The nested impl Trait references a higher-ranked region
|
|
|
|
trait Trait<'a> { type Assoc; }
|
|
impl<'a> Trait<'a> for () { type Assoc = &'a str; }
|
|
|
|
fn test() -> impl for<'a> Trait<'a, Assoc = impl Sized> {}
|
|
//~^ ERROR captures lifetime that does not appear in bounds
|
|
|
|
fn main() {}
|