]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/generic-arg-mismatch-recover.stderr
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / ui / generics / generic-arg-mismatch-recover.stderr
1 error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
2   --> $DIR/generic-arg-mismatch-recover.rs:6:5
3    |
4 LL |     Foo::<'static, 'static, ()>(&0);
5    |     ^^^            ------- help: remove this lifetime argument
6    |     |
7    |     expected 1 lifetime argument
8    |
9 note: struct defined here, with 1 lifetime parameter: `'a`
10   --> $DIR/generic-arg-mismatch-recover.rs:1:8
11    |
12 LL | struct Foo<'a, T: 'a>(&'a T);
13    |        ^^^ --
14
15 error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
16   --> $DIR/generic-arg-mismatch-recover.rs:9:5
17    |
18 LL |     Bar::<'static, 'static, ()>(&());
19    |     ^^^            ------- help: remove this lifetime argument
20    |     |
21    |     expected 1 lifetime argument
22    |
23 note: struct defined here, with 1 lifetime parameter: `'a`
24   --> $DIR/generic-arg-mismatch-recover.rs:3:8
25    |
26 LL | struct Bar<'a>(&'a ());
27    |        ^^^ --
28
29 error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
30   --> $DIR/generic-arg-mismatch-recover.rs:9:5
31    |
32 LL |     Bar::<'static, 'static, ()>(&());
33    |     ^^^                     -- help: remove this generic argument
34    |     |
35    |     expected 0 generic arguments
36    |
37 note: struct defined here, with 0 generic parameters
38   --> $DIR/generic-arg-mismatch-recover.rs:3:8
39    |
40 LL | struct Bar<'a>(&'a ());
41    |        ^^^
42
43 error: aborting due to 3 previous errors
44
45 For more information about this error, try `rustc --explain E0107`.