Turn soft_unstable into a future-compatibility lint

This commit is contained in:
Vadim Petrochenkov 2019-09-07 22:23:53 +03:00
parent f7434aef26
commit 74d8679eff
3 changed files with 9 additions and 1 deletions

View file

@ -436,7 +436,12 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
id: LintId::of(INDIRECT_STRUCTURAL_MATCH),
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/62411>",
edition: None,
}
},
FutureIncompatibleInfo {
id: LintId::of(SOFT_UNSTABLE),
reference: "issue #64266 <https://github.com/rust-lang/rust/issues/64266>",
edition: None,
},
]);
// Register renamed and removed lints.

View file

@ -1,4 +1,5 @@
#[bench] //~ ERROR use of unstable library feature 'test'
//~| WARN this was previously accepted
fn bench() {}
fn main() {}

View file

@ -5,6 +5,8 @@ LL | #[bench]
| ^^^^^
|
= note: `#[deny(soft_unstable)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
error: aborting due to previous error