Skip to content

cfg diagnostic not applied correctly #112672

Closed
@Noratrieb

Description

@Noratrieb

I tried this code:
cargo add rsa

fn main() {
    println!("Hello, world!");
    rsa::sha2::Sha256;
}
error[E0433]: failed to resolve: could not find `sha2` in `rsa`
 --> src/main.rs:5:10
  |
5 |     rsa::sha2::Sha256;
  |          ^^^^ could not find `sha2` in `rsa`

the cfg diagnostic is missing, although the code path for find_cfg_stripped seems to be hit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.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