diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-01 14:54:57 +0300 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-09-13 10:29:18 -0700 |
| commit | 852014a0128f70aed046b5cf710603a52d99b07d (patch) | |
| tree | 28377d3b077037db5912ddb123b414c3f4b3bf44 /src/libcore | |
| parent | ee6de6cf44d8606e2661cfe16b7d4128fbeb0ca2 (diff) | |
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 f9dc53874ac..680fcd12c4f 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -1281,8 +1281,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] #[rustc_macro_transparency = "semitransparent"] |
