Created
November 30, 2024 13:51
-
-
Save jberkenbilt/85e69385c5cf593e25000b3fbeb902de to your computer and use it in GitHub Desktop.
Go to Rust: 02 compiler error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0308]: mismatched types | |
--> device/src/lib.rs:51:5 | |
| | |
51 | run_method(Controller::one, val) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | |
| | |
= note: expected opaque type `impl for<'a> Future<Output = Result<i32, Box<(dyn std::error::Error + Send + Sync + 'static)>>>` | |
found opaque type `impl Future<Output = Result<i32, Box<(dyn std::error::Error + Send + Sync + 'static)>>>` | |
= help: consider `await`ing on both `Future`s | |
= note: distinct uses of `impl Trait` result in different opaque types | |
note: the lifetime requirement is introduced here | |
--> device/src/lib.rs:32:39 | |
| | |
32 | FnT: FnOnce(&Controller, ArgT) -> Fut, | |
| ^^^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment