Detect attempts to expand a macro to a match arm again
Because a macro invocation can expand to a never pattern, we can't rule out a `arm!(),` arm at parse time. Instead we detect that case at expansion time, if the macro tries to output a pattern followed by `=>`.
This commit is contained in:
parent
80bdcbf50a
commit
0bfebc6105
8 changed files with 27 additions and 29 deletions
|
@ -456,8 +456,6 @@ parse_macro_expands_to_adt_field = macros cannot expand to {$adt_ty} fields
|
|||
|
||||
parse_macro_expands_to_enum_variant = macros cannot expand to enum variants
|
||||
|
||||
parse_macro_expands_to_match_arm = macros cannot expand to match arms
|
||||
|
||||
parse_macro_invocation_visibility = can't qualify macro invocation with `pub`
|
||||
.suggestion = remove the visibility
|
||||
.help = try adjusting the macro to put `{$vis}` inside the invocation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue