Skip to content

Commit fcdc68c

Browse files
committed
[EXPERIMENT] Error on trailing semicolons in macro expressions
Opening to gather data about the impact of changing the lint level of rust-lang#79819
1 parent 9044245 commit fcdc68c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_expand/src/mbe/macro_rules.rs

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ impl<'a> ParserAnyMacro<'a> {
135135
lint_node_id,
136136
"trailing semicolon in macro used in expression position",
137137
);
138+
parser
139+
.sess
140+
.span_diagnostic
141+
.struct_span_err(parser.token.span, "Trailing semicolon in macro")
142+
.emit();
138143
parser.bump();
139144
}
140145

0 commit comments

Comments
 (0)