about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-20 02:33:39 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-11 00:12:07 +0300
commitf1d4ebf01505877ff36ba63f8a26ea8ea0973969 (patch)
treefd28c53c8840af05b056f1469e7343455ac7bc66 /src/libcore
parent16918a8e28d4e7a476f31ff3d3c1e2d998c086af (diff)
downloadrust-f1d4ebf01505877ff36ba63f8a26ea8ea0973969.tar.gz
rust-f1d4ebf01505877ff36ba63f8a26ea8ea0973969.zip
Remove unnecessary expansions created by `#[test_case/test/bench]`
The expansions were created to allow unstable things inside `#[test_case/test/bench]`, but that's not a proper way to do that.
Put the required `allow_internal_unstable`s into the macros' properties instead.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/macros.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 2e999a0682b..293a2dd9492 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -1244,12 +1244,14 @@ mod builtin {
 
     /// Attribute macro applied to a function to turn it into a unit test.
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[allow_internal_unstable(test, rustc_attrs)]
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
     pub macro test($item:item) { /* compiler built-in */ }
 
     /// Attribute macro applied to a function to turn it into a benchmark test.
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[allow_internal_unstable(test, rustc_attrs)]
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
     pub macro bench($item:item) { /* compiler built-in */ }
@@ -1257,6 +1259,7 @@ mod builtin {
     /// An implementation detail of the `#[test]` and `#[bench]` macros.
     #[unstable(feature = "custom_test_frameworks", issue = "50297",
                reason = "custom test frameworks are an unstable feature")]
+    #[allow_internal_unstable(test, rustc_attrs)]
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
     pub macro test_case($item:item) { /* compiler built-in */ }