1
Fork 0

Avoid follow-up errors and ICEs after missing lifetime errors on data structures

This commit is contained in:
Oli Scherer 2024-07-04 10:27:00 +00:00
parent 8c39ac9ecc
commit dce98c52ff
22 changed files with 37 additions and 211 deletions

View file

@ -1264,6 +1264,9 @@ impl<'tcx> InferCtxt<'tcx> {
where
T: TypeFoldable<TyCtxt<'tcx>>,
{
if let Err(guar) = value.error_reported() {
self.set_tainted_by_errors(guar);
}
if !value.has_non_region_infer() {
return value;
}