Continue running after typeck_item_bodies
has failed
This commit is contained in:
parent
d1808aa509
commit
936dec8df3
@ -706,11 +706,10 @@ fn typeck_item_bodies<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, crate_num: CrateNum
|
||||
-> Result<(), ErrorReported>
|
||||
{
|
||||
debug_assert!(crate_num == LOCAL_CRATE);
|
||||
Ok(tcx.sess.track_errors(|| {
|
||||
tcx.par_body_owners(|body_owner_def_id| {
|
||||
tcx.ensure().typeck_tables_of(body_owner_def_id);
|
||||
});
|
||||
})?)
|
||||
tcx.par_body_owners(|body_owner_def_id| {
|
||||
tcx.ensure().typeck_tables_of(body_owner_def_id);
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn check_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
|
||||
|
@ -1,6 +1,10 @@
|
||||
fn foo<T>() where for<'a> T: 'a {}
|
||||
|
||||
fn main<'a>() {
|
||||
fn bar<'a>() {
|
||||
foo::<&'a i32>();
|
||||
//~^ ERROR the type `&'a i32` does not fulfill the required lifetime
|
||||
}
|
||||
|
||||
fn main() {
|
||||
bar();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user