rust/tests/ui/type-alias-impl-trait/hkl_forbidden4.stderr

44 lines
1.4 KiB
Plaintext

error: unconstrained opaque type
--> $DIR/hkl_forbidden4.rs:10:23
|
LL | type FutNothing<'a> = impl 'a + Future<Output = ()>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `FutNothing` must be used in combination with a concrete type within the same module
error[E0792]: expected generic lifetime parameter, found `'any`
--> $DIR/hkl_forbidden4.rs:15:5
|
LL | async fn operation(_: &mut ()) -> () {
| - this generic parameter must be used with a generic lifetime parameter
LL |
LL | call(operation).await
| ^^^^^^^^^^^^^^^
error[E0792]: expected generic lifetime parameter, found `'any`
--> $DIR/hkl_forbidden4.rs:22:1
|
LL | type FutNothing<'a> = impl 'a + Future<Output = ()>;
| -- this generic parameter must be used with a generic lifetime parameter
...
LL | / {
LL | |
LL | | }
| |_^
error: concrete type differs from previous defining opaque type use
--> $DIR/hkl_forbidden4.rs:13:1
|
LL | async fn operation(_: &mut ()) -> () {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `FutNothing<'_>`, got `{async fn body of operation()}`
|
note: previous use here
--> $DIR/hkl_forbidden4.rs:15:5
|
LL | call(operation).await
| ^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0792`.