Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for private_macro_use lint #120192

Open
1 of 2 tasks
bvanjoi opened this issue Jan 21, 2024 · 0 comments
Open
1 of 2 tasks

Tracking Issue for private_macro_use lint #120192

bvanjoi opened this issue Jan 21, 2024 · 0 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.

Comments

@bvanjoi
Copy link
Contributor

bvanjoi commented Jan 21, 2024

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

@bvanjoi bvanjoi added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature.
Projects
None yet
Development

No branches or pull requests

1 participant