]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/issue-54182-2.rs
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / issue-54182-2.rs
1 // check-pass
2
3 // Before RFC 2532, normalizing a defaulted assoc. type didn't work at all,
4 // unless the impl in question overrides that type, which makes the default
5 // pointless.
6
7 #![feature(associated_type_defaults)]
8
9 trait Tr {
10     type Assoc = ();
11 }
12
13 impl Tr for () {}
14
15 fn f(thing: <() as Tr>::Assoc) {
16     let c: () = thing;
17 }
18
19 fn main() {}