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

Check cfg when collecting macro defs #19014

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

darichey
Copy link
Contributor

Fixes reaching def map should have macro definition, but it doesn't when a block contains a macro definition which is cfg'd out:

fn main() {
    #[cfg(foo)]
    macro_rules! m {
        () => {};
    }
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 23, 2025
@Veykril Veykril added this pull request to the merge queue Jan 24, 2025
Merged via the queue into rust-lang:master with commit a64667f Jan 24, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants