mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
18 lines
263 B
Rust
18 lines
263 B
Rust
#![feature(type_alias_impl_trait)]
|
|
|
|
pub trait TraitWithAssoc {
|
|
type Assoc;
|
|
}
|
|
|
|
pub type Foo<V> = impl Trait<V::Assoc>;
|
|
//~^ ERROR
|
|
//~| ERROR
|
|
|
|
pub trait Trait<U> {}
|
|
|
|
impl<W> Trait<W> for () {}
|
|
|
|
pub fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T> {
|
|
()
|
|
}
|