]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-36839.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-36839.rs
CommitLineData
dc9dc135 1// check-pass
7cac9316 2
041b39d2
XL
3pub trait Foo {
4 type Bar;
5}
6
7pub trait Broken {
8 type Assoc;
9 fn broken(&self) where Self::Assoc: Foo;
10}
11
12impl<T> Broken for T {
13 type Assoc = ();
14 fn broken(&self) where Self::Assoc: Foo {
15 let _x: <Self::Assoc as Foo>::Bar;
476ff2be
SL
16 }
17}
041b39d2 18
a1dfa0c6 19fn main() {
dc9dc135 20 let _m: &dyn Broken<Assoc=()> = &();
041b39d2 21}