You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: `()` is not a future
--> /home/cdruid/.cargo/target/e4/57393f8231c91d/script.rs:11:1
|
11 | #[trait_variant::make(Run: Send)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
|
= help: the trait `Future` is not implemented for `()`
Peeking at the expansion, it looks like it's coming from:
I think the typical workarounds here are either to use async fn new() (currently used for the !Send case) or let fut: ::core::pin::Pin<Box<dyn ::core::future::Future<Output = std::io::Result<Self>> + 'static + Send>> = panic!(); fut (which I believe was used in the original implementation)
The text was updated successfully, but these errors were encountered:
ComputerDruid
changed the title
where Self:Sized exclusion not working with trait_variant supportwhere Self: Sized exclusion not working with trait_variant support
Feb 17, 2025
Using cargo script for brevity:
Gives compile error:
Peeking at the expansion, it looks like it's coming from:
I think the typical workarounds here are either to use
async fn new()
(currently used for the!Send
case) orlet fut: ::core::pin::Pin<Box<dyn ::core::future::Future<Output = std::io::Result<Self>> + 'static + Send>> = panic!(); fut
(which I believe was used in the original implementation)The text was updated successfully, but these errors were encountered: