]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-36839.rs
Merge commit '1fcc74cc9e03bc91eaa80ecf92976b0b14b3aeb6' into clippyup
[rust.git] / src / test / ui / issues / issue-36839.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 }