diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-10-21 00:46:29 +0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2021-02-19 13:52:57 -0300 |
| commit | 0fddc2f780b7d075797364386a77b5f2f3bf909b (patch) | |
| tree | 5dc1c7b23926cb67136373736b4b09bb802b5b9e /compiler/rustc_parse/src | |
| parent | 25a2c13e9d19c18d5f3c2656e3d2dda086cb023b (diff) | |
| download | rust-0fddc2f780b7d075797364386a77b5f2f3bf909b.tar.gz rust-0fddc2f780b7d075797364386a77b5f2f3bf909b.zip | |
Support `pub` on `macro_rules`
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 10 |
1 files changed, 1 insertions, 9 deletions
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( |
