mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-06-15 00:04:58 +02:00
macros3 solution
This commit is contained in:
@ -1 +1,13 @@
|
||||
// Solutions will be available before the stable release. Thank you for testing the beta version 🥰
|
||||
// Added the attribute `macro_use` attribute.
|
||||
#[macro_use]
|
||||
mod macros {
|
||||
macro_rules! my_macro {
|
||||
() => {
|
||||
println!("Check out my macro!");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
my_macro!();
|
||||
}
|
||||
|
Reference in New Issue
Block a user