Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
This commit is contained in:
@@ -1405,7 +1405,7 @@ impl<'a> LintDiagnostic<'a, ()> for NonLocalDefinitionsDiag {
|
||||
diag.note(fluent::lint_macro_to_change);
|
||||
}
|
||||
if let Some(cargo_update) = cargo_update {
|
||||
diag.subdiagnostic(&diag.dcx, cargo_update);
|
||||
diag.subdiagnostic(diag.dcx, cargo_update);
|
||||
}
|
||||
|
||||
if has_trait {
|
||||
@@ -1471,7 +1471,7 @@ impl<'a> LintDiagnostic<'a, ()> for NonLocalDefinitionsDiag {
|
||||
diag.note(fluent::lint_non_local_definitions_deprecation);
|
||||
|
||||
if let Some(cargo_update) = cargo_update {
|
||||
diag.subdiagnostic(&diag.dcx, cargo_update);
|
||||
diag.subdiagnostic(diag.dcx, cargo_update);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user