1
Fork 0

Use &mut Diagnostic instead of &mut DiagnosticBuilder unless needed

This commit is contained in:
Michael Goulet 2022-08-10 03:39:41 +00:00
parent 34a6cae28e
commit a2b6744af0
15 changed files with 37 additions and 59 deletions

View file

@ -859,7 +859,7 @@ impl<'a> Parser<'a> {
);
let mut err = self.struct_span_err(span, &msg);
let suggest_parens = |err: &mut DiagnosticBuilder<'_, _>| {
let suggest_parens = |err: &mut Diagnostic| {
let suggestions = vec![
(span.shrink_to_lo(), "(".to_string()),
(span.shrink_to_hi(), ")".to_string()),