Support "soft" feature-gating using a lint

Use it for feature-gating `#[bench]`
This commit is contained in:
Vadim Petrochenkov 2019-09-01 14:54:57 +03:00
parent ef54f57c5b
commit f7434aef26
9 changed files with 58 additions and 27 deletions

View file

@ -0,0 +1,4 @@
#[bench] //~ ERROR use of unstable library feature 'test'
fn bench() {}
fn main() {}

View 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