Support "soft" feature-gating using a lint
Use it for feature-gating `#[bench]`
This commit is contained in:
parent
ef54f57c5b
commit
f7434aef26
9 changed files with 58 additions and 27 deletions
4
src/test/ui/feature-gates/bench.rs
Normal file
4
src/test/ui/feature-gates/bench.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#[bench] //~ ERROR use of unstable library feature 'test'
|
||||
fn bench() {}
|
||||
|
||||
fn main() {}
|
||||
10
src/test/ui/feature-gates/bench.stderr
Normal file
10
src/test/ui/feature-gates/bench.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
|
||||
--> $DIR/bench.rs:1:3
|
||||
|
|
||||
LL | #[bench]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: `#[deny(soft_unstable)]` on by default
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue