error[E0271]: expected `{async block@$DIR/tests/compile_fail/task_wrong_output.rs:11:32: 11:37}` to be a future that resolves to `Result<Note, ApiError>`, but it resolves to `{integer}`
--> tests/compile_fail/task_wrong_output.rs:11:32
|
11 | let _task = SaveNote::task(async { 3 });
| -------------- ^^^^^^^^^^^ expected `Result<Note, ApiError>`, found integer
| |
| required by a bound introduced by this call
|
= note: expected enum `Result<Note, ApiError>`
found type `{integer}`
note: required by a bound in `task`
--> src/task.rs
|
| fn task<F>(future: F) -> impl NamedTask<Output = Self::Output> + Send + 'static
| ---- required by a bound in this associated function
| where
| F: Future<Output = Self::Output> + Send + 'static,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `TaskName::task`
error[E0271]: expected `{async block@$DIR/tests/compile_fail/task_wrong_output.rs:11:32: 11:37}` to be a future that resolves to `Result<Note, ApiError>`, but it resolves to `{integer}`
--> tests/compile_fail/task_wrong_output.rs:11:17
|
11 | let _task = SaveNote::task(async { 3 });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<Note, ApiError>`, found integer
|
= note: expected enum `Result<Note, ApiError>`
found type `{integer}`
note: required by a bound in `task`
--> src/task.rs
|
| fn task<F>(future: F) -> impl NamedTask<Output = Self::Output> + Send + 'static
| ---- required by a bound in this associated function
| where
| F: Future<Output = Self::Output> + Send + 'static,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `TaskName::task`