]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
Rollup merge of #85174 - GuillaumeGomez:doc-code-block-border-radius, r=jsha
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-missing-lifetime.stderr
1 warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/gat-trait-path-missing-lifetime.rs:1:12
3    |
4 LL | #![feature(generic_associated_types)]
5    |            ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8    = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
9
10 error[E0107]: missing generics for associated type `X::Y`
11   --> $DIR/gat-trait-path-missing-lifetime.rs:11:20
12    |
13 LL |   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
14    |                    ^ expected 1 lifetime argument
15    |
16 note: associated type defined here, with 1 lifetime parameter: `'a`
17   --> $DIR/gat-trait-path-missing-lifetime.rs:5:8
18    |
19 LL |   type Y<'a>;
20    |        ^ --
21 help: add missing lifetime argument
22    |
23 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
24    |                    ^^^^^
25
26 error[E0107]: missing generics for associated type `X::Y`
27   --> $DIR/gat-trait-path-missing-lifetime.rs:11:20
28    |
29 LL |   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
30    |                    ^ expected 1 lifetime argument
31    |
32 note: associated type defined here, with 1 lifetime parameter: `'a`
33   --> $DIR/gat-trait-path-missing-lifetime.rs:5:8
34    |
35 LL |   type Y<'a>;
36    |        ^ --
37 help: add missing lifetime argument
38    |
39 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
40    |                    ^^^^^
41
42 error: aborting due to 2 previous errors; 1 warning emitted
43
44 For more information about this error, try `rustc --explain E0107`.