move old files to a separate directory

This commit is contained in:
olivia
2018-04-26 21:29:11 +02:00
parent 32ac403da5
commit 5e89d1e888
53 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
// macros3.rs
// Make me compile, without taking the macro out of the module! Scroll down for hints :)
mod macros {
macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
}
fn main() {
my_macro!();
}
// In order to use a macro outside of its module, you need to do something
// special to the module to lift the macro out into its parent.
// The same trick also works on "extern crate" statements for crates that have
// exported macros, if you've seen any of those around.