Skip to content

Commit

Permalink
Turn soft_unstable into a future-compatibility lint
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Sep 7, 2019
1 parent f7434ae commit 74d8679
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustc_lint/lib.rs
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/feature-gates/bench.rs
@@ -1,4 +1,5 @@
#[bench] //~ ERROR use of unstable library feature 'test'
//~| WARN this was previously accepted
fn bench() {}

fn main() {}
2 changes: 2 additions & 0 deletions src/test/ui/feature-gates/bench.stderr
Expand Up @@ -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

0 comments on commit 74d8679

Please sign in to comment.