Skip to content

cfg diagnostic not applied on imports #112674

Closed
@Noratrieb

Description

@Noratrieb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions