2019-06-12 18:18:32 +03:00
|
|
|
// check-pass
|
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() {
|
2019-05-28 14:46:13 -04:00
|
|
|
let _m: &dyn Broken<Assoc=()> = &();
|
2017-06-17 14:43:10 -06:00
|
|
|
}
|