2018-10-31 13:08:01 +01:00
|
|
|
// compile-pass
|
|
|
|
|
// skip-codegen
|
2017-06-17 14:43:10 -06:00
|
|
|
|
|
|
|
|
pub trait Foo {
|
|
|
|
|
type Bar;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub trait Broken {
|
|
|
|
|
type Assoc;
|
|
|
|
|
fn broken(&self) where Self::Assoc: Foo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<T> Broken for T {
|
|
|
|
|
type Assoc = ();
|
|
|
|
|
fn broken(&self) where Self::Assoc: Foo {
|
|
|
|
|
let _x: <Self::Assoc as Foo>::Bar;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-31 13:08:01 +01:00
|
|
|
|
|
|
|
|
fn main() {
|
2017-06-17 14:43:10 -06:00
|
|
|
let _m: &Broken<Assoc=()> = &();
|
|
|
|
|
}
|