dtolnay / async-trait

Type erasure for async trait methods
Apache License 2.0
1.84k stars 85 forks source link

Using `do yeet` in a async trait function makes the compilation fail #198

Closed JavaDerg closed 2 years ago

JavaDerg commented 2 years ago

I understand that this may not be a high priority, I mean who knows how long this syntax will last, but it would be cool to see this work.

#![feature(yeet_expr)]

#[async_trait::async_trait]
trait Test {
    async fn test(&self) -> Result<Infallible, ()> {
        do yeet;
    }
}
error: expected expression
  --> src/main.rs:22:9
   |
22 |         do yeet;
   |         ^^

Rustc version: rustc 1.63.0-nightly (ee160f2f5 2022-05-23) For reference: https://github.com/rust-lang/rust/issues/96373

dtolnay commented 2 years ago

do yeet is only placeholder syntax so I am not interested in supporting it.