]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/issue-22037.rs
Rollup merge of #107519 - joboet:raw_os_error_ty, r=Amanieu
[rust.git] / tests / ui / associated-types / issue-22037.rs
1 trait A {
2     type Output;
3     fn a(&self) -> <Self as A>::X;
4     //~^ ERROR cannot find associated type `X` in trait `A`
5 }
6
7 impl A for u32 {
8     type Output = u32;
9     fn a(&self) -> u32 {
10         0
11     }
12 }
13
14 fn main() {
15     let a: u32 = 0;
16     let b: u32 = a.a();
17 }