-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
#![allow(unexpected_cfgs)] does not work for modules #124735
Copy link
Copy link
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-check-cfg--check-cfg--check-cfgL-unexpected_cfgsLint: unexpected_cfgsLint: unexpected_cfgsS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-check-cfg--check-cfg--check-cfgL-unexpected_cfgsLint: unexpected_cfgsLint: unexpected_cfgsS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: no warning
Instead, this happened:
#![allow(unexpected_cfgs)]is ignored:Even if adding
#[allow(unexpected_cfgs)]tomod a;, the result is the same.cc @Urgau
Meta
rustc --version --verbose: