rust-lang / impl-trait-utils

Utilities for working with impl traits in Rust.
Apache License 2.0
89 stars 9 forks source link

Original trait has default implement #22

Closed bestgopher closed 8 months ago

bestgopher commented 8 months ago
fn main() {}

#[trait_variant::make(AsyncTraitExampleSend: Send)]
trait AsyncTraitExample {
    async fn example(&self) {
        println!("aaa");
    }
}

The example code shown above. And expand the macor:

trait AsyncTraitExampleSend: Send {
    fn example(&self) -> impl ::core::future::Future<Output = ()> + Send {
        {
            ::std::io::_print(format_args!("aaa\n"));
        };
    }
}

Build failed.

girstenbrei commented 8 months ago

See #17 , your issue is probably a duplicate.