Problem
All the names of lints and lint groups use - instead of _ in the output of rustc -Whelp:
[zack@laptop ~]$ rustc --version
rustc 1.99.0-nightly (1a98b1e13 2026-08-07)
[zack@laptop ~]$ rustc -Whelp
Available lint options:
-W <foo> Warn about <foo>
-A <foo> Allow <foo>
-D <foo> Deny <foo>
-F <foo> Forbid <foo> (deny <foo> and all attempts to override)
Lint checks provided by rustc:
name default meaning
---- ------- -------
absolute-paths-not-starting-with-crate allow fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name
⋮
Despite the "official names" using - instead of _ at least per rustc in -Whelp and diagnostic messages (e.g., note: requested on the command line with `-D unused-results`), cargo check complains that the use of such names is deprecated and won't work in a future edition:
[zack@laptop example]$ cargo check
warning: Cargo.toml: `lints.rust.ambiguous-negative-literals` is deprecated in favor of `lints.rust.ambiguous_negative_literals` and will not work in a future edition
warning: Cargo.toml: `lints.rust.closure-returning-async-block` is deprecated in favor of `lints.rust.closure_returning_async_block` and will not work in a future edition
warning: Cargo.toml: `lints.rust.dead-code-pub-in-binary` is deprecated in favor of `lints.rust.dead_code_pub_in_binary` and will not work in a future edition
warning: Cargo.toml: `lints.rust.deprecated-in-future` is deprecated in favor of `lints.rust.deprecated_in_future` and will not work in a future edition
warning: Cargo.toml: `lints.rust.deprecated-safe` is deprecated in favor of `lints.rust.deprecated_safe` and will not work in a future edition
warning: Cargo.toml: `lints.rust.deref-into-dyn-supertrait` is deprecated in favor of `lints.rust.deref_into_dyn_supertrait` and will not work in a future edition
warning: Cargo.toml: `lints.rust.ffi-unwind-calls` is deprecated in favor of `lints.rust.ffi_unwind_calls` and will not work in a future edition
warning: Cargo.toml: `lints.rust.future-incompatible` is deprecated in favor of `lints.rust.future_incompatible` and will not work in a future edition
warning: Cargo.toml: `lints.rust.impl-trait-redundant-captures` is deprecated in favor of `lints.rust.impl_trait_redundant_captures` and will not work in a future edition
warning: Cargo.toml: `lints.rust.keyword-idents` is deprecated in favor of `lints.rust.keyword_idents` and will not work in a future edition
warning: Cargo.toml: `lints.rust.let-underscore` is deprecated in favor of `lints.rust.let_underscore` and will not work in a future edition
warning: Cargo.toml: `lints.rust.linker-info` is deprecated in favor of `lints.rust.linker_info` and will not work in a future edition
warning: Cargo.toml: `lints.rust.macro-use-extern-crate` is deprecated in favor of `lints.rust.macro_use_extern_crate` and will not work in a future edition
warning: Cargo.toml: `lints.rust.meta-variable-misuse` is deprecated in favor of `lints.rust.meta_variable_misuse` and will not work in a future edition
warning: Cargo.toml: `lints.rust.missing-copy-implementations` is deprecated in favor of `lints.rust.missing_copy_implementations` and will not work in a future edition
warning: Cargo.toml: `lints.rust.missing-debug-implementations` is deprecated in favor of `lints.rust.missing_debug_implementations` and will not work in a future edition
warning: Cargo.toml: `lints.rust.missing-docs` is deprecated in favor of `lints.rust.missing_docs` and will not work in a future edition
warning: Cargo.toml: `lints.rust.non-ascii-idents` is deprecated in favor of `lints.rust.non_ascii_idents` and will not work in a future edition
warning: Cargo.toml: `lints.rust.nonstandard-style` is deprecated in favor of `lints.rust.nonstandard_style` and will not work in a future edition
warning: Cargo.toml: `lints.rust.redundant-imports` is deprecated in favor of `lints.rust.redundant_imports` and will not work in a future edition
warning: Cargo.toml: `lints.rust.redundant-lifetimes` is deprecated in favor of `lints.rust.redundant_lifetimes` and will not work in a future edition
warning: Cargo.toml: `lints.rust.refining-impl-trait` is deprecated in favor of `lints.rust.refining_impl_trait` and will not work in a future edition
warning: Cargo.toml: `lints.rust.rust-2018-compatibility` is deprecated in favor of `lints.rust.rust_2018_compatibility` and will not work in a future edition
warning: Cargo.toml: `lints.rust.rust-2018-idioms` is deprecated in favor of `lints.rust.rust_2018_idioms` and will not work in a future edition
warning: Cargo.toml: `lints.rust.rust-2021-compatibility` is deprecated in favor of `lints.rust.rust_2021_compatibility` and will not work in a future edition
warning: Cargo.toml: `lints.rust.rust-2024-compatibility` is deprecated in favor of `lints.rust.rust_2024_compatibility` and will not work in a future edition
warning: Cargo.toml: `lints.rust.single-use-lifetimes` is deprecated in favor of `lints.rust.single_use_lifetimes` and will not work in a future edition
warning: Cargo.toml: `lints.rust.trivial-casts` is deprecated in favor of `lints.rust.trivial_casts` and will not work in a future edition
warning: Cargo.toml: `lints.rust.trivial-numeric-casts` is deprecated in favor of `lints.rust.trivial_numeric_casts` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unit-bindings` is deprecated in favor of `lints.rust.unit_bindings` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unknown-or-malformed-diagnostic-attributes` is deprecated in favor of `lints.rust.unknown_or_malformed_diagnostic_attributes` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unnameable-types` is deprecated in favor of `lints.rust.unnameable_types` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unreachable-pub` is deprecated in favor of `lints.rust.unreachable_pub` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unsafe-code` is deprecated in favor of `lints.rust.unsafe_code` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unstable-features` is deprecated in favor of `lints.rust.unstable_features` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unused-crate-dependencies` is deprecated in favor of `lints.rust.unused_crate_dependencies` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unused-import-braces` is deprecated in favor of `lints.rust.unused_import_braces` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unused-lifetimes` is deprecated in favor of `lints.rust.unused_lifetimes` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unused-qualifications` is deprecated in favor of `lints.rust.unused_qualifications` and will not work in a future edition
warning: Cargo.toml: `lints.rust.unused-results` is deprecated in favor of `lints.rust.unused_results` and will not work in a future edition
warning: `example` (manifest) generated 40 warnings
Proposed Solution
Lints should be allowed to have - instead of _ in [lints.rust] or rustc -Whelp and diagnostic messages reported from rustc should be updated to use _ instead of -.
Notes
I believe #17298 is the sudden cause of these warnings. I have been informed this is due to #17051.
Problem
All the names of lints and lint groups use
-instead of_in the output ofrustc -Whelp:Despite the "official names" using
-instead of_at least perrustcin-Whelpand diagnostic messages (e.g.,note: requested on the command line with `-D unused-results`),cargo checkcomplains that the use of such names is deprecated and won't work in a future edition:Proposed Solution
Lints should be allowed to have
-instead of_in[lints.rust]orrustc -Whelpand diagnostic messages reported fromrustcshould be updated to use_instead of-.Notes
I believe #17298 is the sudden cause of theseI have been informed this is due to #17051.warnings.