parent
680089c2d9
commit
ada4a6430d
3 changed files with 6 additions and 14 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue