Skip to content

Commit 8e599b0

Browse files
committed
de-stabilize bench attribute
1 parent 4847d6a commit 8e599b0

File tree

5 files changed

+12
-71
lines changed

5 files changed

+12
-71
lines changed

Diff for: library/core/src/macros/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,6 @@ pub(crate) mod builtin {
16831683
#[unstable(
16841684
feature = "test",
16851685
issue = "50297",
1686-
soft,
16871686
reason = "`bench` is a part of custom test frameworks which are unstable"
16881687
)]
16891688
#[allow_internal_unstable(test, rustc_attrs, coverage_attribute)]

Diff for: tests/ui/feature-gates/bench.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//@ edition:2018
22

33
#[bench] //~ ERROR use of unstable library feature `test`
4-
//~| WARN this was previously accepted
54
fn bench() {}
65

76
use bench as _; //~ ERROR use of unstable library feature `test`
8-
//~| WARN this was previously accepted
97
fn main() {}

Diff for: tests/ui/feature-gates/bench.stderr

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,23 @@
1-
error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
1+
error[E0658]: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
22
--> $DIR/bench.rs:3:3
33
|
44
LL | #[bench]
55
| ^^^^^
66
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
9-
= note: `#[deny(soft_unstable)]` on by default
7+
= note: see issue #50297 <https://github.com/rust-lang/rust/issues/50297> for more information
8+
= help: add `#![feature(test)]` to the crate attributes to enable
9+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

11-
error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
12-
--> $DIR/bench.rs:7:5
11+
error[E0658]: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
12+
--> $DIR/bench.rs:6:5
1313
|
1414
LL | use bench as _;
1515
| ^^^^^
1616
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
17+
= note: see issue #50297 <https://github.com/rust-lang/rust/issues/50297> for more information
18+
= help: add `#![feature(test)]` to the crate attributes to enable
19+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1920

2021
error: aborting due to 2 previous errors
2122

22-
Future incompatibility report: Future breakage diagnostic:
23-
error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
24-
--> $DIR/bench.rs:3:3
25-
|
26-
LL | #[bench]
27-
| ^^^^^
28-
|
29-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
31-
= note: `#[deny(soft_unstable)]` on by default
32-
33-
Future breakage diagnostic:
34-
error: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
35-
--> $DIR/bench.rs:7:5
36-
|
37-
LL | use bench as _;
38-
| ^^^^^
39-
|
40-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
42-
= note: `#[deny(soft_unstable)]` on by default
43-
23+
For more information about this error, try `rustc --explain E0658`.

Diff for: tests/ui/lint/expansion-time.rs

-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ macro_rules! foo {
99
macro_rules! m { ($i) => {} } //~ WARN missing fragment specifier
1010
//~| WARN this was previously accepted
1111

12-
#[warn(soft_unstable)]
13-
mod benches {
14-
#[bench] //~ WARN use of unstable library feature `test`
15-
//~| WARN this was previously accepted
16-
fn foo() {}
17-
}
18-
1912
#[deprecated = "reason"]
2013
macro_rules! deprecated {
2114
() => {}

Diff for: tests/ui/lint/expansion-time.stderr

+2-31
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,19 @@ note: the lint level is defined here
2626
LL | #[warn(missing_fragment_specifier)]
2727
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2828

29-
warning: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
30-
--> $DIR/expansion-time.rs:14:7
31-
|
32-
LL | #[bench]
33-
| ^^^^^
34-
|
35-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
37-
note: the lint level is defined here
38-
--> $DIR/expansion-time.rs:12:8
39-
|
40-
LL | #[warn(soft_unstable)]
41-
| ^^^^^^^^^^^^^
42-
4329
warning: include macro expected single expression in source
4430
--> $DIR/expansion-time-include.rs:4:1
4531
|
4632
LL | 2
4733
| ^
4834
|
4935
note: the lint level is defined here
50-
--> $DIR/expansion-time.rs:29:8
36+
--> $DIR/expansion-time.rs:22:8
5137
|
5238
LL | #[warn(incomplete_include)]
5339
| ^^^^^^^^^^^^^^^^^^
5440

55-
warning: 4 warnings emitted
41+
warning: 3 warnings emitted
5642

5743
Future incompatibility report: Future breakage diagnostic:
5844
warning: missing fragment specifier
@@ -69,18 +55,3 @@ note: the lint level is defined here
6955
LL | #[warn(missing_fragment_specifier)]
7056
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
7157

72-
Future breakage diagnostic:
73-
warning: use of unstable library feature `test`: `bench` is a part of custom test frameworks which are unstable
74-
--> $DIR/expansion-time.rs:14:7
75-
|
76-
LL | #[bench]
77-
| ^^^^^
78-
|
79-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
80-
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
81-
note: the lint level is defined here
82-
--> $DIR/expansion-time.rs:12:8
83-
|
84-
LL | #[warn(soft_unstable)]
85-
| ^^^^^^^^^^^^^
86-

0 commit comments

Comments
 (0)