mirror of https://github.com/rust-lang/rust
23 lines
365 B
Rust
23 lines
365 B
Rust
#![feature(type_alias_impl_trait)]
|
|
|
|
pub trait Trait<'a> {
|
|
type Assoc;
|
|
}
|
|
|
|
trait Test<'a> {}
|
|
|
|
pub type Foo = impl for<'a> Trait<'a, Assoc = impl Test<'a>>;
|
|
//~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
|
|
|
|
impl Trait<'_> for () {
|
|
type Assoc = ();
|
|
}
|
|
|
|
impl Test<'_> for () {}
|
|
|
|
fn constrain() -> Foo {
|
|
()
|
|
}
|
|
|
|
fn main() {}
|