rust/tests/ui/impl-trait/rpit/early_bound.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
891 B
Plaintext
Raw Normal View History

2024-03-18 16:03:18 +00:00
error[E0792]: expected generic lifetime parameter, found `'_`
--> $DIR/early_bound.rs:7:17
|
LL | fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
| -- this generic parameter must be used with a generic lifetime parameter
...
LL | let _ = identity::<&'a ()>(test(false));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-09 14:12:59 +00:00
error: concrete type differs from previous defining opaque type use
--> $DIR/early_bound.rs:3:29
|
LL | fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
| ^^^^^^^^^^^^^^^ expected `&()`, got `()`
|
note: previous use here
--> $DIR/early_bound.rs:7:36
|
LL | let _ = identity::<&'a ()>(test(false));
| ^^^^^^^^^^^
2024-03-18 16:03:18 +00:00
error: aborting due to 2 previous errors
2024-01-09 14:12:59 +00:00
2024-03-18 16:03:18 +00:00
For more information about this error, try `rustc --explain E0792`.