Auto merge of #126623 - oli-obk:do_not_count_errors, r=davidtwco
Replace all `&DiagCtxt` with a `DiagCtxtHandle<'_>` wrapper type r? `@davidtwco` This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle Basically I will add a field to the `DiagCtxtHandle` that refers back to the `InferCtxt`'s (and others) `Option<ErrorHandled>`, allowing us to immediately taint these contexts when emitting an error and not needing manual tainting anymore (which is easy to forget and we don't do in general anyway)
This commit is contained in:
commit
dd104ef163
118 changed files with 773 additions and 915 deletions
|
@ -104,7 +104,7 @@ impl<'a> LintDiagnostic<'a, ()> for MustNotSupend<'_, '_> {
|
|||
diag.primary_message(fluent::mir_transform_must_not_suspend);
|
||||
diag.span_label(self.yield_sp, fluent::_subdiag::label);
|
||||
if let Some(reason) = self.reason {
|
||||
diag.subdiagnostic(diag.dcx, reason);
|
||||
diag.subdiagnostic(reason);
|
||||
}
|
||||
diag.span_help(self.src_sp, fluent::_subdiag::help);
|
||||
diag.arg("pre", self.pre);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue