]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / projection-mismatch-in-impl-where-clause.rs
1 pub trait Super {
2     type Assoc;
3 }
4
5 impl Super for () {
6     type Assoc = u8;
7 }
8
9 pub trait Test {}
10
11 impl<T> Test for T where T: Super<Assoc = ()> {}
12
13 fn test() -> impl Test {
14     //~^ERROR type mismatch resolving `<() as Super>::Assoc == ()`
15     ()
16 }
17
18 fn main() {
19     let a = test();
20 }