Audit deprecation lints and hardcoded warnings and turn most of them into errors in 2018 edition #52593
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2018
Area: The 2018 edition
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
F-rust_2018_preview
`#![feature(rust_2018_preview)]`
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Milestone
Most these are going to become errors in 2015 edition as well sooner or later, but since edition switch is an explicit opt in, it's a good opportunity to tie disabling of all the deprecated stuff to it as well.
The amount of additional required changes will be negligible compared to changes already required for 2018 migration, especially if we are counting "2018 idioms" in.
Additionally, hardcoded warnings are bad, mkay, and audit is also necessary to turn them into configurable lints or errors. (Most of the warnings are very old and predate the deprecation lint system, and fire only in very rare cases.)
How to: add some kind of flag to
span_warn
and deprecation lint machinery that's false by default and "false" means it's a hard error on 2018 edition. Explicit opt-out can be applied so that a lint/warning continues being a lint/warning even on 2018 edition.Known lints/warnings requiring opt-out:
private_in_public
, going to be removed when Tracking issue for RFC #2145: Type privacy and private-in-public lints #48054 is implementedrust/src/libsyntax/parse/parser.rs
Lines 2004 to 2005 in 942b384
The text was updated successfully, but these errors were encountered: