Add test for "const stability on macro"
This commit is contained in:
parent
19806e4514
commit
49310cee30
3 changed files with 38 additions and 2 deletions
|
@ -774,8 +774,11 @@ impl SyntaxExtension {
|
|||
sess.parse_sess
|
||||
.span_diagnostic
|
||||
.struct_span_err(sp, "macros cannot have const stability attributes")
|
||||
.span_label(sp, "invalid stability attribute")
|
||||
.span_label(span, "in this macro")
|
||||
.span_label(sp, "invalid const stability attribute")
|
||||
.span_label(
|
||||
sess.source_map().guess_head_span(span),
|
||||
"const stability attribute affects this macro",
|
||||
)
|
||||
.emit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue