]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-36839.rs
Auto merge of #55519 - fhartwig:hashmap-index-example, r=Centril
[rust.git] / src / test / ui / issues / issue-36839.rs
1 // compile-pass
2 // skip-codegen
3
4 pub trait Foo {
5     type Bar;
6 }
7
8 pub trait Broken {
9     type Assoc;
10     fn broken(&self) where Self::Assoc: Foo;
11 }
12
13 impl<T> Broken for T {
14     type Assoc = ();
15     fn broken(&self) where Self::Assoc: Foo {
16         let _x: <Self::Assoc as Foo>::Bar;
17     }
18 }
19
20
21 fn main() {
22     let _m: &Broken<Assoc=()> = &();
23 }