Skip to content

cfg diagnostic not applied on imports #112674

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

Closed
Noratrieb opened this issue Jun 15, 2023 · 0 comments · Fixed by #112854
Closed

cfg diagnostic not applied on imports #112674

Noratrieb opened this issue Jun 15, 2023 · 0 comments · Fixed by #112854
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Noratrieb
Copy link
Member

Import errors work differently than other path resolution errors and don't call find_cfg_stripped yet.

pub use a::x;

mod a {
    #[cfg(no)]
    pub fn x() {}
}

fn main() {}

this should note that x has been configured out.

@Noratrieb Noratrieb added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name/path resolution done by `rustc_resolve` specifically T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 15, 2023
@bors bors closed this as completed in a1f2f23 Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant