Skip to content

Commit dce98c5

Browse files
committed
Avoid follow-up errors and ICEs after missing lifetime errors on data structures
1 parent 8c39ac9 commit dce98c5

22 files changed

+37
-211
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ build/
5050
/target
5151
/src/bootstrap/target
5252
/src/tools/x/target
53+
/inc-fat/
5354
# Created by default with `src/ci/docker/run.sh`
5455
/obj/
5556
/rustc-ice*

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,9 @@ impl<'tcx> InferCtxt<'tcx> {
12641264
where
12651265
T: TypeFoldable<TyCtxt<'tcx>>,
12661266
{
1267+
if let Err(guar) = value.error_reported() {
1268+
self.set_tainted_by_errors(guar);
1269+
}
12671270
if !value.has_non_region_infer() {
12681271
return value;
12691272
}

tests/crashes/124083.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/crashes/124262.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/crashes/125155.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/crashes/125888.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/crashes/125992.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/crashes/126648.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/crashes/126666.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/crashes/127266.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)