Rollup merge of #113999 - Centri3:macro-arm-expand, r=wesleywiser
Specify macro is invalid in certain contexts Adds a note when a macro is used where it really shouldn't be. Closes #113766
This commit is contained in:
commit
1f076fe1d8
9 changed files with 246 additions and 24 deletions
|
@ -461,6 +461,12 @@ parse_loop_else = `{$loop_kind}...else` loops are not supported
|
|||
.note = consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
|
||||
.loop_keyword = `else` is attached to this loop
|
||||
|
||||
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