rust/tests/ui/mir/issue-91745.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
328 B
Rust
Raw Normal View History

// 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=()> = &();
}