Created
April 13, 2018 14:07
-
-
Save rust-play/a5caf7b9ebc7d93d987048692ebf8183 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
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
mod somemod { | |
#[derive(Debug)] | |
pub struct B; | |
} | |
macro_rules! get_type { | |
($struct_name:ident) => (self::somemod::$struct_name) | |
} | |
fn main() { | |
println!("{:?}", get_type!(B)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment