Skip to content

Exercise 10: Macros Calling Macros has some error #63

Description

@Arashimu

When I run the code as follow:

 macro_rules! test {
     () => {
         1 + 1
     };
 }
fn main(){
println!("{}",stringify!(test!()));
}   

/*
output:
test!()
*/

the result is "test!()", which contrarys to the "the internal macro will be expanded first".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions