Rollup merge of #100351 - compiler-errors:diagnostic-convention, r=fee1-dead
Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder` unless needed
This seems to be the established convention (02ff9e0) when `DiagnosticBuilder` was first added. I am guilty of introducing some of these.
This commit is contained in:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user