fork/rust

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

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

master
1.2 KiB33 linesraw
1error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
2  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
3   |
4LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
5   |                          ^ expected 1 lifetime argument
6   |
7note: associated type defined here, with 1 lifetime parameter: `'a`
8  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
9   |
10LL |     type Y<'a>;
11   |          ^ --
12help: add missing lifetime argument
13   |
14LL | fn f<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
15   |                            +++
16
17error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
18  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
19   |
20LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
21   |                          ^--- help: remove these generics
22   |                          |
23   |                          expected 0 generic arguments
24   |
25note: associated type defined here, with 0 generic parameters
26  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
27   |
28LL |     type Y<'a>;
29   |          ^
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0107`.