-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Description
My existing code has:
#[allow(unreadable_literal)]
Which produces this warning on the beta channel:
lint name `unreadable_literal` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
note: #[warn(renamed_and_removed_lints)] on by default
help: change it to: `clippy::unreadable_literal`
However, changing it to clippy::unreadable_literal
causes the following:
scoped lint `clippy::unreadable_literal` is experimental (see issue #44690)
On nightly #![feature(tool_lints)]
can be used as an escape hatch but that's not an option on beta.
IMO neither Nightly nor Beta should generate warnings to change code to something that requires a feature flag. The existing code was valid for the stable features of the language.
joelgallant, jtgeibel, arbitrix, imp and stanislav-tkach
Activity
joelgallant commentedon Sep 20, 2018
The offending lint is here in beta:
rust/src/librustc/lint/levels.rs
Lines 278 to 308 in b7e4402
It appears to be different (and not "may not", but rather "will not") in nightly.
etaoins commentedon Sep 20, 2018
cc #44690
etaoins commentedon Oct 13, 2018
This should be fixed by #54870
sdroege commentedon Nov 9, 2018
@etaoins This is still not optimal: it's not possible to silence the warning, and doing what the warning suggests makes compilation fail with current stable and older releases.
As such, running nightly clippy (and soon stable clippy) will always produce warnings unless the codebase drops support for an older toolchain version.
Mark-Simulacrum commentedon Nov 9, 2018
I'm going to reopen this so that we can look and see if there's some warning-free way of doing this.
Revert "Ignore clippy warnings on deprecated methods", due to rust-la…
Revert "Ignore clippy warnings on deprecated methods", due to rust-la…