-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-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.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.
Description
I tried this:
# t.json is a target spec file with an unknown field
$ cat t.json | grep foo
"foo": "bar",
$ rustc -Dwarnings --target=t.json < /dev/null
I expected to see this happen: the warning: target json file contains unused fields: foo
diagnostic to be an error.
Instead, this happened: the warning is still a warning, even with -Dwarnings
.
If this is intended (i.e. if -Dwarnings
is only intended for code-related diagnostics), then this issue would be a feature request: a way to control whether non-code warnings are (or not) errors for CI purposes.
Meta
Happens in both stable (1.56.1) and the latest nightly:
rustc 1.58.0-nightly (dd549dcab 2021-11-25)
binary: rustc
commit-hash: dd549dcab404ec4c7d07b5a83aca5bdd7171138f
commit-date: 2021-11-25
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0
alex
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.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-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.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.