fn gate_proc_macro_expansion_kind(&self, span: Span, kind: AstFragmentKind) {
let kind = match kind {
- AstFragmentKind::Expr => "expressions",
+ AstFragmentKind::Expr |
AstFragmentKind::OptExpr => "expressions",
AstFragmentKind::Pat => "patterns",
- AstFragmentKind::Ty => "types",
AstFragmentKind::Stmts => "statements",
- AstFragmentKind::Items => return,
- AstFragmentKind::TraitItems => return,
- AstFragmentKind::ImplItems => return,
+ AstFragmentKind::Ty |
+ AstFragmentKind::Items |
+ AstFragmentKind::TraitItems |
+ AstFragmentKind::ImplItems |
AstFragmentKind::ForeignItems => return,
AstFragmentKind::Arms
| AstFragmentKind::Fields
= note: for more information, see https://github.com/rust-lang/rust/issues/54727
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-error[E0658]: procedural macros cannot be expanded to types
- --> $DIR/proc-macro-gates.rs:53:13
- |
-LL | let _x: identity!(u32) = 3;
- | ^^^^^^^^^^^^^^
- |
- = note: for more information, see https://github.com/rust-lang/rust/issues/54727
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
error[E0658]: procedural macros cannot be expanded to patterns
- --> $DIR/proc-macro-gates.rs:54:12
+ --> $DIR/proc-macro-gates.rs:53:12
|
LL | if let identity!(Some(_x)) = Some(3) {}
| ^^^^^^^^^^^^^^^^^^^
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
error[E0658]: procedural macros cannot be expanded to statements
- --> $DIR/proc-macro-gates.rs:57:5
+ --> $DIR/proc-macro-gates.rs:56:5
|
LL | empty!(struct S;);
| ^^^^^^^^^^^^^^^^^^
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
error[E0658]: procedural macros cannot be expanded to statements
- --> $DIR/proc-macro-gates.rs:58:5
+ --> $DIR/proc-macro-gates.rs:57:5
|
LL | empty!(let _x = 3;);
| ^^^^^^^^^^^^^^^^^^^^
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
error[E0658]: procedural macros cannot be expanded to expressions
- --> $DIR/proc-macro-gates.rs:60:14
+ --> $DIR/proc-macro-gates.rs:59:14
|
LL | let _x = identity!(3);
| ^^^^^^^^^^^^
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
error[E0658]: procedural macros cannot be expanded to expressions
- --> $DIR/proc-macro-gates.rs:61:15
+ --> $DIR/proc-macro-gates.rs:60:15
|
LL | let _x = [empty!(3)];
| ^^^^^^^^^
= note: for more information, see https://github.com/rust-lang/rust/issues/54727
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-error: aborting due to 17 previous errors
+error: aborting due to 16 previous errors
For more information about this error, try `rustc --explain E0658`.