about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-09-19 01:46:18 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-10-05 11:40:40 +0400
commit8994c6d417e25eba3cd077c0dce5760cfd05d576 (patch)
tree853afa3e3ea0e7eda630137e8c39183c29259e98 /src/libsyntax_ext
parent60a1d4e6c2b23eeed79ea7ca2cbc43713d10197e (diff)
downloadrust-8994c6d417e25eba3cd077c0dce5760cfd05d576.tar.gz
rust-8994c6d417e25eba3cd077c0dce5760cfd05d576.zip
expansion: Remove restriction on use of macro attributes with test/bench
The restrictions were introduced in https://github.com/rust-lang/rust/pull/54277 and no longer necessary now because legacy plugins are now expanded in usual left-to-right order
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/test.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libsyntax_ext/test.rs b/src/libsyntax_ext/test.rs
index 8ddfb1d9cba..be3485cfa7c 100644
--- a/src/libsyntax_ext/test.rs
+++ b/src/libsyntax_ext/test.rs
@@ -49,7 +49,7 @@ pub fn expand_test_or_bench(
     // If we're not in test configuration, remove the annotated item
     if !cx.ecfg.should_test { return vec![]; }
 
-    let mut item =
+    let item =
         if let Annotatable::Item(i) = item { i }
         else {
             cx.parse_sess.span_diagnostic.span_fatal(item.span(),
@@ -192,12 +192,6 @@ pub fn expand_test_or_bench(
 
     debug!("Synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
 
-    // Temporarily add another marker to the original item for error reporting
-    let marker2 = cx.attribute(
-        attr_sp, cx.meta_word(attr_sp, Symbol::intern("rustc_test_marker2"))
-    );
-    item.attrs.push(marker2);
-
     vec![
         // Access to libtest under a gensymed name
         Annotatable::Item(test_extern),