mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-20 20:44:52 +00:00
23 lines
422 B
Rust
23 lines
422 B
Rust
// check-pass
|
|
// compile-flags: -Znext-solver
|
|
// regression test for trait-system-refactor-initiative#68
|
|
trait Identity {
|
|
type Assoc: ?Sized;
|
|
}
|
|
|
|
impl<T: ?Sized> Identity for T {
|
|
type Assoc = T;
|
|
}
|
|
|
|
type Id<T> = <T as Identity>::Assoc;
|
|
|
|
type Five<T> = Id<Id<Id<Id<Id<T>>>>>;
|
|
type Ty<T> = Five<Five<Five<Five<Five<T>>>>>;
|
|
|
|
trait Trait<T> {}
|
|
|
|
impl<T> Trait<T> for Ty<T> {}
|
|
impl Trait<u32> for Ty<i32> {}
|
|
|
|
fn main() {}
|