Rollup merge of #135378 - compiler-errors:unnecessary-stashing, r=chenyukang
Remove a bunch of diagnostic stashing that doesn't do anything #121669 removed a bunch of conditional diagnostic stashing/canceling, but left around the `steal` calls which just emitted the error eagerly instead of canceling the diagnostic. I think that these no-op `steal` calls don't do much and are confusing to encounter, so let's remove them. The net effect is: 1. We emit more duplicated errors, since stashing has the side effect of duplicating diagnostics. This is not a big deal, since outside of `-Zdeduplicate-diagnostics=no`, the errors are already being deduplicated by the compiler. 2. It changes the order of diagnostics, since we're no longer stashing and then later stealing the errors. I don't think this matters much for the changes that the UI test suite manifests, and it makes these errors less order dependent.
This commit is contained in:
commit
b53239668a
22 changed files with 177 additions and 185 deletions
|
@ -575,7 +575,7 @@ fn sanity_check_found_hidden_type<'tcx>(
|
|||
} else {
|
||||
let span = tcx.def_span(key.def_id);
|
||||
let other = ty::OpaqueHiddenType { ty: hidden_ty, span };
|
||||
Err(ty.build_mismatch_error(&other, key.def_id, tcx)?.emit())
|
||||
Err(ty.build_mismatch_error(&other, tcx)?.emit())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue