2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
|
|
|
|
2017-05-16 08:04:32 -05:00
|
|
|
// Make sure we don't crash with a cycle error during coherence.
|
|
|
|
|
2020-05-17 03:22:48 -05:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2017-05-16 08:04:32 -05:00
|
|
|
|
|
|
|
trait Trait<T> {
|
|
|
|
type Assoc;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Trait<T> for Vec<T> {
|
|
|
|
default type Assoc = ();
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait<u8> for Vec<u8> {
|
|
|
|
type Assoc = u8;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Trait<T> for String {
|
|
|
|
type Assoc = ();
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait<<Vec<u8> as Trait<u8>>::Assoc> for String {}
|
|
|
|
|
|
|
|
fn main() {}
|