mirror of https://github.com/rust-lang/rust
19 lines
315 B
Rust
19 lines
315 B
Rust
#![feature(type_alias_impl_trait)]
|
|
|
|
type Opaque<'a> = impl Sized + 'a;
|
|
|
|
trait Trait<'a> {
|
|
type Assoc;
|
|
}
|
|
|
|
impl<'a> Trait<'a> for () {
|
|
type Assoc = ();
|
|
}
|
|
|
|
fn test() -> &'static dyn for<'a> Trait<'a, Assoc = Opaque<'a>> {
|
|
&()
|
|
//~^ ERROR: expected generic lifetime parameter, found `'a`
|
|
}
|
|
|
|
fn main() {}
|