]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-parenthesised-args.stderr
1 error: lifetime in trait object type must be followed by `+`
2   --> $DIR/gat-trait-path-parenthesised-args.rs:7:29
3    |
4 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
5    |                             ^^
6
7 error: parenthesized generic arguments cannot be used in associated type constraints
8   --> $DIR/gat-trait-path-parenthesised-args.rs:7:27
9    |
10 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
11    |                           ^^^^^
12
13 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
14   --> $DIR/gat-trait-path-parenthesised-args.rs:7:27
15    |
16 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
17    |                           ^ expected 1 lifetime argument
18    |
19 note: associated type defined here, with 1 lifetime parameter: `'a`
20   --> $DIR/gat-trait-path-parenthesised-args.rs:4:8
21    |
22 LL |   type Y<'a>;
23    |        ^ --
24 help: add missing lifetime argument
25    |
26 LL | fn foo<'a>(arg: Box<dyn X<Y('a, 'a) = &'a ()>>) {}
27    |                             +++
28
29 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
30   --> $DIR/gat-trait-path-parenthesised-args.rs:7:27
31    |
32 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
33    |                           ^---- help: remove these generics
34    |                           |
35    |                           expected 0 generic arguments
36    |
37 note: associated type defined here, with 0 generic parameters
38   --> $DIR/gat-trait-path-parenthesised-args.rs:4:8
39    |
40 LL |   type Y<'a>;
41    |        ^
42
43 error: aborting due to 4 previous errors
44
45 For more information about this error, try `rustc --explain E0107`.