]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-missing-lifetime.stderr
1 error[E0107]: missing generics for associated type `X::Y`
2   --> $DIR/gat-trait-path-missing-lifetime.rs:10:20
3    |
4 LL |   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
5    |                    ^ expected 1 lifetime argument
6    |
7 note: associated type defined here, with 1 lifetime parameter: `'a`
8   --> $DIR/gat-trait-path-missing-lifetime.rs:4:8
9    |
10 LL |   type Y<'a>;
11    |        ^ --
12 help: add missing lifetime argument
13    |
14 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
15    |                    ~~~~~
16
17 error[E0107]: missing generics for associated type `X::Y`
18   --> $DIR/gat-trait-path-missing-lifetime.rs:10:20
19    |
20 LL |   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
21    |                    ^ expected 1 lifetime argument
22    |
23 note: associated type defined here, with 1 lifetime parameter: `'a`
24   --> $DIR/gat-trait-path-missing-lifetime.rs:4:8
25    |
26 LL |   type Y<'a>;
27    |        ^ --
28 help: add missing lifetime argument
29    |
30 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
31    |                    ~~~~~
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0107`.