From f7434aef26bc413469fc0dfeadecabf75e18bd38 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 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 */ } -- cgit 1.4.1-3-g733a5