Skip to content

Commit 4a90349

Browse files
committed
Continue running after typeck_item_bodies has failed
1 parent e03588b commit 4a90349

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,10 @@ fn typeck_item_bodies<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, crate_num: CrateNum
706706
-> Result<(), ErrorReported>
707707
{
708708
debug_assert!(crate_num == LOCAL_CRATE);
709-
Ok(tcx.sess.track_errors(|| {
710-
tcx.par_body_owners(|body_owner_def_id| {
711-
tcx.ensure().typeck_tables_of(body_owner_def_id);
712-
});
713-
})?)
709+
tcx.par_body_owners(|body_owner_def_id| {
710+
tcx.ensure().typeck_tables_of(body_owner_def_id);
711+
});
712+
Ok(())
714713
}
715714

716715
fn check_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {

src/test/ui/issues/issue-26217.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
fn foo<T>() where for<'a> T: 'a {}
22

3-
fn main<'a>() {
3+
fn bar<'a>() {
44
foo::<&'a i32>();
55
//~^ ERROR the type `&'a i32` does not fulfill the required lifetime
66
}
7+
8+
fn main() {
9+
bar();
10+
}

0 commit comments

Comments
 (0)