Skip to content

Commit 74d8679

Browse files
committed
Turn soft_unstable into a future-compatibility lint
1 parent f7434ae commit 74d8679

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Diff for: src/librustc_lint/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,12 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
436436
id: LintId::of(INDIRECT_STRUCTURAL_MATCH),
437437
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/62411>",
438438
edition: None,
439-
}
439+
},
440+
FutureIncompatibleInfo {
441+
id: LintId::of(SOFT_UNSTABLE),
442+
reference: "issue #64266 <https://github.com/rust-lang/rust/issues/64266>",
443+
edition: None,
444+
},
440445
]);
441446

442447
// Register renamed and removed lints.

Diff for: src/test/ui/feature-gates/bench.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#[bench] //~ ERROR use of unstable library feature 'test'
2+
//~| WARN this was previously accepted
23
fn bench() {}
34

45
fn main() {}

Diff for: src/test/ui/feature-gates/bench.stderr

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

911
error: aborting due to previous error
1012

0 commit comments

Comments
 (0)