Skip to content

Tracking Issue for private_macro_use lint #120192

Open
@bvanjoi

Description

@bvanjoi

This is a tracking issue for the private_macro_use, a lint that follows the breaking change policy.

Description

The root of this issue was originally posted in #119301. A macro that should not have been exported was indeed exported. A minimal example to illustrate this issue is shown below:

// extern_macro.rs
macro_rules! foo_ { () => {} };
use foo_ as foo;

// code.rs
#[macro_use]
extern crate extern_macro;

fn main() {
    foo!(); // this should trigger a compile error, but it doesn't
}

The problem was triggered by an oversight where a visibility check for the macro, defined in an external crate, was omitted. Now, we have reintroduced this check to prevent such issues from occurring.

Steps

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions