Skip to content

macros: tt fragments treat $(foo)* like foo #39390

Closed
@jseyfried

Description

@jseyfried

For example, the following compiles and prints success:

macro_rules! identity {
    ($t:tt) => { $t }
}

identity! {
    $(fn $(main)* () {
        $($( println!($("success")+); )+)+
    })*
}

Metadata

Metadata

Assignees

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions