diff options
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/unescape_error_reporting.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs index c7d166319ea..bec4561928c 100644 --- a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs +++ b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs @@ -202,7 +202,7 @@ pub(crate) fn emit_unescape_error( diag.emit(); } EscapeError::TooShortHexEscape => { - handler.span_err(span, "numeric character escape is too short") + handler.span_err(span, "numeric character escape is too short"); } EscapeError::InvalidCharInHexEscape | EscapeError::InvalidCharInUnicodeEscape => { let (c, span) = last_char(); diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index a485d12b0c0..27e83394611 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -212,10 +212,10 @@ impl<'a> Parser<'a> { if let Err(mut e) = self.expect_semi() { match tree.kind { UseTreeKind::Glob => { - e.note("the wildcard token must be last on the path").emit(); + e.note("the wildcard token must be last on the path"); } UseTreeKind::Nested(..) => { - e.note("glob-like brace syntax must be last on the path").emit(); + e.note("glob-like brace syntax must be last on the path"); } _ => (), } @@ -1507,7 +1507,7 @@ impl<'a> Parser<'a> { // Make sure an error was emitted (either by recovering an angle bracket, // or by finding an identifier as the next token), since we're // going to continue parsing - assert!(self.sess.span_diagnostic.has_errors()); + assert!(self.sess.span_diagnostic.has_errors().is_some()); } else { return Err(err); } |
