-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
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:
- Lint
private_in_public
, going to be removed when Tracking issue for RFC #2145: Type privacy and private-in-public lints #48054 is implemented - Hardcoded warning
rust/src/libsyntax/parse/parser.rs
Lines 2004 to 2005 in 942b384
self.diagnostic().struct_span_warn(self.prev_span, "unnecessary path disambiguator") .span_label(self.prev_span, "try removing `::`").emit(); - Maybe more... waiting on audit.