diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-01 14:54:57 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-07 21:37:51 +0300 |
| commit | f7434aef26bc413469fc0dfeadecabf75e18bd38 (patch) | |
| tree | 3cac9e58eec901a58254d7b842e811d2fa06edac /src/libcore | |
| parent | ef54f57c5b9d894a38179d09b00610c1b337b086 (diff) | |
| download | rust-f7434aef26bc413469fc0dfeadecabf75e18bd38.tar.gz rust-f7434aef26bc413469fc0dfeadecabf75e18bd38.zip | |
Support "soft" feature-gating using a lint
Use it for feature-gating `#[bench]`
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/macros.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index ffaca029a8a..384bc874998 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -1236,8 +1236,10 @@ pub(crate) mod builtin { pub macro test($item:item) { /* compiler built-in */ } /// Attribute macro applied to a function to turn it into a benchmark test. - #[unstable(feature = "test", issue = "50297", - reason = "`bench` is a part of custom test frameworks which are unstable")] + #[cfg_attr(not(boostrap_stdarch_ignore_this), unstable(soft, feature = "test", issue = "50297", + reason = "`bench` is a part of custom test frameworks which are unstable"))] + #[cfg_attr(boostrap_stdarch_ignore_this, unstable(feature = "test", issue = "50297", + reason = "`bench` is a part of custom test frameworks which are unstable"))] #[allow_internal_unstable(test, rustc_attrs)] #[rustc_builtin_macro] pub macro bench($item:item) { /* compiler built-in */ } |
