1
Fork 0

Remove Parser methods that duplicate DiagCtxt methods.

This commit is contained in:
Nicholas Nethercote 2023-12-18 21:09:22 +11:00
parent d86a48278f
commit ec9af0d6cb
11 changed files with 54 additions and 61 deletions

View file

@ -444,7 +444,7 @@ impl<'a> Parser<'a> {
msg: Cow<'static, str>,
) -> DiagnosticBuilder<'a> {
let sp = self.token.span;
let mut e = self.struct_span_err(sp, msg);
let mut e = self.dcx().struct_span_err(sp, msg);
let do_not_suggest_help = self.token.is_keyword(kw::In) || self.token == token::Colon;
// Check to see if the user has written something like