]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/defaults-in-other-trait-items.stderr
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / defaults-in-other-trait-items.stderr
1 error[E0308]: mismatched types
2   --> $DIR/defaults-in-other-trait-items.rs:9:13
3    |
4 LL |     type A = ();
5    |     ------------ associated type defaults can't be assumed inside the trait defining them
6 ...
7 LL |         let () = p;
8    |             ^^ expected associated type, found `()`
9    |
10    = note: expected associated type `<Self as Tr>::A`
11                     found unit type `()`
12
13 error[E0308]: mismatched types
14   --> $DIR/defaults-in-other-trait-items.rs:35:25
15    |
16 LL |     type Ty = u8;
17    |     ------------- associated type defaults can't be assumed inside the trait defining them
18 ...
19 LL |     const C: Self::Ty = 0u8;
20    |                         ^^^ expected associated type, found `u8`
21    |
22    = note: expected associated type `<Self as AssocConst>::Ty`
23                          found type `u8`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.