Skip to content

macro_rules! definitions with parenthesis breaks filtering by item path #101

@ElusiveMori

Description

@ElusiveMori

Example:

// lib.rs
pub mod a;

// a.rs
macro_rules! b (
    () => {}
);

Running cargo expand whatever will dump the whole expanded crate.

If we change the macro to

macro_rules! b {
    () => {}
}

It will fail correctly with WARNING: no such item: asdasda

Having a macro like this anywhere in the crate will break the path resolution mechanism, for some reason, causing the path to be ignored all the time.

I'm not sure if macro_rules with parens has any rightful place to exist, but I just spent about half an hour trying to figure this one out ;-;

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