Created
October 26, 2018 21:23
-
-
Save dfyz/e84d59ff0b651849dc2b1f8d4bfd6fa8 to your computer and use it in GitHub Desktop.
This file contains 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
trait Foo {} | |
trait Bar {} | |
macro_rules! implement_traits { | |
($type_name:ty) => { | |
impl Foo for $type_name {} | |
impl Bar for $type_name {} | |
}; | |
} | |
struct A {} | |
implement_traits!(A); | |
fn main() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment