]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
Bless tests after rebase
[rust.git] / tests / 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:5: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:5:27
9    |
10 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
11    |                           ^^^^^
12    |
13 help: use angle brackets instead
14    |
15 LL | fn foo<'a>(arg: Box<dyn X<Y<'a> = &'a ()>>) {}
16    |                            ~  ~
17
18 error: parenthesized generic arguments cannot be used in associated type constraints
19   --> $DIR/gat-trait-path-parenthesised-args.rs:12:27
20    |
21 LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
22    |                           ^--
23    |                            |
24    |                            help: remove these parentheses
25
26 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
27   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
28    |
29 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
30    |                           ^ expected 1 lifetime argument
31    |
32 note: associated type defined here, with 1 lifetime parameter: `'a`
33   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
34    |
35 LL |   type Y<'a>;
36    |        ^ --
37 help: add missing lifetime argument
38    |
39 LL | fn foo<'a>(arg: Box<dyn X<Y('_, 'a) = &'a ()>>) {}
40    |                             +++
41
42 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
43   --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
44    |
45 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
46    |                           ^---- help: remove these generics
47    |                           |
48    |                           expected 0 generic arguments
49    |
50 note: associated type defined here, with 0 generic parameters
51   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
52    |
53 LL |   type Y<'a>;
54    |        ^
55
56 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
57   --> $DIR/gat-trait-path-parenthesised-args.rs:12:27
58    |
59 LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
60    |                           ^ expected 1 lifetime argument
61    |
62 note: associated type defined here, with 1 lifetime parameter: `'a`
63   --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
64    |
65 LL |   type Y<'a>;
66    |        ^ --
67 help: add missing lifetime argument
68    |
69 LL | fn bar<'a>(arg: Box<dyn X<Y('_) = ()>>) {}
70    |                             ++
71
72 error: aborting due to 6 previous errors
73
74 For more information about this error, try `rustc --explain E0107`.