Rename Parser::span_diagnostic
as Parser::dcx
.
This commit is contained in:
parent
09af8a667c
commit
73bac456d4
8 changed files with 40 additions and 42 deletions
|
@ -873,7 +873,7 @@ impl<'a> Parser<'a> {
|
|||
// will direct us over to `parse_enum_variant()`.
|
||||
if self.token == token::OpenDelim(Delimiter::Parenthesis) {
|
||||
return Err(EnumPatternInsteadOfIdentifier { span: self.prev_token.span }
|
||||
.into_diagnostic(self.diagnostic()));
|
||||
.into_diagnostic(self.dcx()));
|
||||
}
|
||||
|
||||
Ok(PatKind::Ident(binding_annotation, ident, sub))
|
||||
|
@ -987,7 +987,7 @@ impl<'a> Parser<'a> {
|
|||
// check that a comma comes after every field
|
||||
if !ate_comma {
|
||||
let mut err = ExpectedCommaAfterPatternField { span: self.token.span }
|
||||
.into_diagnostic(self.diagnostic());
|
||||
.into_diagnostic(self.dcx());
|
||||
if let Some(mut delayed) = delayed_err {
|
||||
delayed.emit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue