]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/issue-69398.rs
Rollup merge of #105567 - TimNN:kcfi16, r=nikic
[rust.git] / src / test / ui / associated-types / issue-69398.rs
1 // check-pass
2
3 pub trait Foo {
4     type Bar;
5 }
6
7 pub trait Broken {
8     type Assoc;
9     fn broken(&self) where Self::Assoc: Foo;
10 }
11
12 impl<T> Broken for T {
13     type Assoc = ();
14     fn broken(&self) where Self::Assoc: Foo {
15         let _x: <Self::Assoc as Foo>::Bar;
16     }
17 }
18
19 fn main() {
20     let _m: &dyn Broken<Assoc=()> = &();
21 }