a procedural macro for creating extension traits
nikomatsakis opened this issue · 2 comments
nikomatsakis commented
I would like a macro where
#[private_extension(Foo)]
impl SomeExternalType {
fn method(&self) { ... }
}
would expand to
trait Foo {
fn method(&self);
}
impl Foo for SomeExternalType { .. }
dtolnay commented
Yep, that looks like it. Thanks! https://crates.io/crates/extend is another implementation.