fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB47 linesraw
1error[E0106]: missing lifetime specifier
2  --> $DIR/missing-lifetime-in-alias.rs:20:24
3   |
4LL | type B<'a> = <A<'a> as Trait>::Foo;
5   |                        ^^^^^ expected named lifetime parameter
6   |
7help: consider using the `'a` lifetime
8   |
9LL | type B<'a> = <A<'a> as Trait<'a>>::Foo;
10   |                             ++++
11
12error[E0106]: missing lifetime specifier
13  --> $DIR/missing-lifetime-in-alias.rs:24:28
14   |
15LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
16   |                            ^^^^^ expected named lifetime parameter
17   |
18note: these named lifetimes are available to use
19  --> $DIR/missing-lifetime-in-alias.rs:24:8
20   |
21LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
22   |        ^^  ^^
23help: consider using one of the available lifetimes here
24   |
25LL | type C<'a, 'b> = <A<'a> as Trait<'lifetime>>::Bar;
26   |                                 +++++++++++
27
28error[E0107]: missing generics for associated type `Trait::Bar`
29  --> $DIR/missing-lifetime-in-alias.rs:24:36
30   |
31LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
32   |                                    ^^^ expected 1 lifetime argument
33   |
34note: associated type defined here, with 1 lifetime parameter: `'b`
35  --> $DIR/missing-lifetime-in-alias.rs:4:10
36   |
37LL |     type Bar<'b>
38   |          ^^^ --
39help: add missing lifetime argument
40   |
41LL | type C<'a, 'b> = <A<'a> as Trait>::Bar<'a>;
42   |                                       ++++
43
44error: aborting due to 3 previous errors
45
46Some errors have detailed explanations: E0106, E0107.
47For more information about an error, try `rustc --explain E0106`.