From 0fddc2f780b7d075797364386a77b5f2f3bf909b Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Wed, 21 Oct 2020 00:46:29 +0300 Subject: Support `pub` on `macro_rules` --- compiler/rustc_parse/src/parser/item.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index cdea82f50ed..45f6dbca9f0 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1488,15 +1488,7 @@ impl<'a> Parser<'a> { let vstr = pprust::vis_to_string(vis); let vstr = vstr.trim_end(); if macro_rules { - let msg = format!("can't qualify macro_rules invocation with `{}`", vstr); - self.struct_span_err(vis.span, &msg) - .span_suggestion( - vis.span, - "try exporting the macro", - "#[macro_export]".to_owned(), - Applicability::MaybeIncorrect, // speculative - ) - .emit(); + self.sess.gated_spans.gate(sym::pub_macro_rules, vis.span); } else { self.struct_span_err(vis.span, "can't qualify macro invocation with `pub`") .span_suggestion( -- cgit 1.4.1-3-g733a5