Skip to content

Commit

Permalink
but not finish nacro
Browse files Browse the repository at this point in the history
  • Loading branch information
Withsan committed Oct 9, 2023
1 parent 1d44f2c commit 7c69f69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion exercises/macros/macros1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ macro_rules! my_macro {
}

fn main() {
my_macro();
my_macro!();
}
7 changes: 3 additions & 4 deletions exercises/macros/macros2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

// I AM NOT DONE

fn main() {
my_macro!();
}

macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
fn main() {
my_macro!();
}
4 changes: 2 additions & 2 deletions exercises/macros/macros3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
// I AM NOT DONE

mod macros {
macro_rules! my_macro {
pub macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
}

fn main() {
my_macro!();
macros::my_macro!();
}

0 comments on commit 7c69f69

Please sign in to comment.