From 852014a0128f70aed046b5cf710603a52d99b07d Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 1 Sep 2019 14:54:57 +0300 Subject: Support "soft" feature-gating using a lint Use it for feature-gating `#[bench]` --- src/libcore/macros.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libcore') 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"] -- cgit 1.4.1-3-g733a5