-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.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.
Description
Using the --force-warns
option with an unknown lint name causes an ICE.
rustc +nightly --force-warns=abc -Zunstable-options foo.rs
I expected to see this happen: Issue a E0602 error.
Meta
rustc --version --verbose
:
rustc 1.55.0-nightly (885399992 2021-07-06)
binary: rustc
commit-hash: 885399992c4c1dde37b506b8507a7d69415646b9
commit-date: 2021-07-06
host: x86_64-apple-darwin
release: 1.55.0-nightly
LLVM version: 12.0.1
Backtrace
thread 'rustc' panicked at 'compiler/rustc_lint/src/levels.rs:117:37: A valid lint failed to produce a lint ids', compiler/rustc_middle/src/util/bug.rs:35:26
stack backtrace:
0: std::panicking::begin_panic
1: std::panic::panic_any
2: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
3: rustc_middle::ty::context::tls::with_opt::{{closure}}
4: rustc_middle::ty::context::tls::with_opt
5: rustc_middle::util::bug::opt_span_bug_fmt
6: rustc_middle::util::bug::bug_fmt
7: rustc_lint::levels::LintLevelsBuilder::process_command_line::{{closure}}
8: rustc_lint::levels::LintLevelsBuilder::new
9: rustc_lint::context::EarlyContext::new
10: rustc_lint::early::check_ast_crate
11: rustc_interface::passes::pre_expansion_lint
12: rustc_interface::passes::configure_and_expand
13: rustc_interface::queries::Queries::expansion
14: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
15: rustc_span::with_source_map
16: rustc_interface::interface::create_compiler_and_run
17: scoped_tls::ScopedKey<T>::set
cc @rylev
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.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.