Skip to content

Invalid macro fails only if used #21370

Closed
@aochagavia

Description

@aochagavia

The following code only produces an error when the macro is used. Compilation should actually fail even if the macro is never used.

macro_rules! test { ($wrong:t_ty) => () }

fn main() {
     //test!("hello world"); only causes an error if uncommented
}

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions