Skip to content

Commit

Permalink
[EXPERIMENT] Error on trailing semicolons in macro expressions
Browse files Browse the repository at this point in the history
Opening to gather data about the impact of changing the lint level of rust-lang#79819
  • Loading branch information
Aaron1011 committed Jul 4, 2021
1 parent 9044245 commit fcdc68c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_expand/src/mbe/macro_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ impl<'a> ParserAnyMacro<'a> {
lint_node_id,
"trailing semicolon in macro used in expression position",
);
parser
.sess
.span_diagnostic
.struct_span_err(parser.token.span, "Trailing semicolon in macro")
.emit();
parser.bump();
}

Expand Down

0 comments on commit fcdc68c

Please sign in to comment.