Skip to content

Commit a67f033

Browse files
authored
simplify parse_format::Parser::err by calling err_with_note with note=None
1 parent cf577f3 commit a67f033

File tree

1 file changed

+1
-8
lines changed
  • compiler/rustc_parse_format/src

1 file changed

+1
-8
lines changed

compiler/rustc_parse_format/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,7 @@ impl<'a> Parser<'a> {
372372
label: S2,
373373
span: InnerSpan,
374374
) {
375-
self.errors.push(ParseError {
376-
description: description.into(),
377-
note: None,
378-
label: label.into(),
379-
span,
380-
secondary_label: None,
381-
suggestion: Suggestion::None,
382-
});
375+
self.err_with_note(description, label, None, span);
383376
}
384377

385378
/// Notifies of an error. The message doesn't actually need to be of type

0 commit comments

Comments
 (0)