Don't cancel stashed OpaqueHiddenTypeMismatch
errors.
This gives one extra error message on one test, but is necessary to fix bigger problems caused by the cancellation of stashed errors. (Note: why not just avoid stashing altogether? Because that resulted in additional output changes.)
This commit is contained in:
parent
c475e2303b
commit
c4ec196c7e
3 changed files with 19 additions and 2 deletions
|
@ -852,7 +852,11 @@ impl<'tcx> OpaqueHiddenType<'tcx> {
|
|||
.dcx()
|
||||
.steal_diagnostic(tcx.def_span(opaque_def_id), StashKey::OpaqueHiddenTypeMismatch)
|
||||
{
|
||||
diag.cancel();
|
||||
// We used to cancel here for slightly better error messages, but
|
||||
// cancelling stashed diagnostics is no longer allowed because it
|
||||
// causes problems when tracking whether errors have actually
|
||||
// occurred.
|
||||
diag.emit();
|
||||
}
|
||||
(self.ty, other.ty).error_reported()?;
|
||||
// Found different concrete types for the opaque type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue