Remove redundant argument from subdiagnostic
method
This commit is contained in:
parent
7ba82d61eb
commit
3f34196839
38 changed files with 361 additions and 542 deletions
|
@ -1966,7 +1966,7 @@ impl<'a> Parser<'a> {
|
|||
if self.token.kind == token::Not {
|
||||
if let Err(mut err) = self.unexpected() {
|
||||
// Encounter the macro invocation
|
||||
err.subdiagnostic(self.dcx(), MacroExpandsToAdtField { adt_ty });
|
||||
err.subdiagnostic(MacroExpandsToAdtField { adt_ty });
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
|
@ -2382,13 +2382,10 @@ impl<'a> Parser<'a> {
|
|||
.into_iter()
|
||||
.any(|s| self.prev_token.is_ident_named(s));
|
||||
|
||||
err.subdiagnostic(
|
||||
self.dcx(),
|
||||
errors::FnTraitMissingParen {
|
||||
span: self.prev_token.span,
|
||||
machine_applicable,
|
||||
},
|
||||
);
|
||||
err.subdiagnostic(errors::FnTraitMissingParen {
|
||||
span: self.prev_token.span,
|
||||
machine_applicable,
|
||||
});
|
||||
}
|
||||
return Err(err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue