]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/elided-in-expr-position.stderr
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
[rust.git] / src / test / ui / generic-associated-types / elided-in-expr-position.stderr
1 error[E0107]: missing generics for associated type `Trait::Assoc`
2   --> $DIR/elided-in-expr-position.rs:10:26
3    |
4 LL |     fn g(&self) -> Self::Assoc;
5    |                          ^^^^^ expected 1 lifetime argument
6    |
7 note: associated type defined here, with 1 lifetime parameter: `'a`
8   --> $DIR/elided-in-expr-position.rs:5:10
9    |
10 LL |     type Assoc<'a> where Self: 'a;
11    |          ^^^^^ --
12 help: add missing lifetime argument
13    |
14 LL |     fn g(&self) -> Self::Assoc<'_>;
15    |                          ~~~~~~~~~
16
17 error[E0107]: missing generics for associated type `Trait::Assoc`
18   --> $DIR/elided-in-expr-position.rs:32:26
19    |
20 LL |     fn g(&self) -> Self::Assoc {
21    |                          ^^^^^ expected 1 lifetime argument
22    |
23 note: associated type defined here, with 1 lifetime parameter: `'a`
24   --> $DIR/elided-in-expr-position.rs:5:10
25    |
26 LL |     type Assoc<'a> where Self: 'a;
27    |          ^^^^^ --
28 help: add missing lifetime argument
29    |
30 LL |     fn g(&self) -> Self::Assoc<'_> {
31    |                          ~~~~~~~~~
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0107`.