Skip to content

2018: #[macro_export(local_inner_macros)] breaks recursion in submodules #52726

@durka

Description

@durka

I tried adding #[macro_export(local_inner_macros)] to make a macro usable outside my crate, but it broke usability inside the crate (like for tests). The code:

#[macro_export(local_inner_macros)]
macro_rules! foo {
    () => { bar!(); };
}

macro_rules! bar {
    () => {}
}

mod tests {
    foo!();
}

This works in 2015, and it works in 2018 if you remove (local_inner_macros), but with both it doesn't. This seems like a problem for the migration path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions