mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 18:44:56 +00:00
22 lines
328 B
Rust
22 lines
328 B
Rust
|
// check-pass
|
||
|
|
||
|
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: &dyn Broken<Assoc=()> = &();
|
||
|
}
|