blob: f484e98640f792b276eec421d192f056f27d7cc2 [file] [log] [blame]
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Make sure we don't crash with a cycle error during coherence.
#![feature(specialization)]
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() {}