rust/src/test/ui/issues/issue-36839.rs
2018-12-25 21:08:33 -07:00

23 lines
343 B
Rust

// compile-pass
// skip-codegen
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;
}
}
fn main() {
let _m: &Broken<Assoc=()> = &();
}