Revert "pre-expansion gate decl_macro"

This reverts commit 1f470ceac2.
This commit is contained in:
Eduard-Mihai Burtescu 2019-10-31 18:35:41 +02:00
parent 680089c2d9
commit ada4a6430d
3 changed files with 6 additions and 14 deletions

View file

@ -443,6 +443,11 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
"auto traits are experimental and possibly buggy");
}
ast::ItemKind::MacroDef(ast::MacroDef { legacy: false, .. }) => {
let msg = "`macro` is experimental";
gate_feature_post!(&self, decl_macro, i.span, msg);
}
ast::ItemKind::OpaqueTy(..) => {
gate_feature_post!(
&self,

View file

@ -2,8 +2,4 @@
macro m() {} //~ ERROR `macro` is experimental
macro_rules! accept_item { ($i:item) => {} }
accept_item! {
macro m() {} //~ ERROR `macro` is experimental
}
fn main() {}

View file

@ -7,15 +7,6 @@ LL | macro m() {}
= note: for more information, see https://github.com/rust-lang/rust/issues/39412
= help: add `#![feature(decl_macro)]` to the crate attributes to enable
error[E0658]: `macro` is experimental
--> $DIR/feature-gate-decl_macro.rs:7:5
|
LL | macro m() {}
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/39412
= help: add `#![feature(decl_macro)]` to the crate attributes to enable
error: aborting due to 2 previous errors
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.