summaryrefslogtreecommitdiff
path: root/exercises/21_macros/macros3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/21_macros/macros3.rs')
-rw-r--r--exercises/21_macros/macros3.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/exercises/21_macros/macros3.rs b/exercises/21_macros/macros3.rs
new file mode 100644
index 0000000..b795c14
--- /dev/null
+++ b/exercises/21_macros/macros3.rs
@@ -0,0 +1,20 @@
+// macros3.rs
+//
+// Make me compile, without taking the macro out of the module!
+//
+// Execute `rustlings hint macros3` or use the `hint` watch subcommand for a
+// hint.
+
+// I AM NOT DONE
+
+mod macros {
+ macro_rules! my_macro {
+ () => {
+ println!("Check out my macro!");
+ };
+ }
+}
+
+fn main() {
+ my_macro!();
+}