Make configure_and_expand "infalllible" by just aborting the compilation if it fails instead of bubbling out an error

This commit is contained in:
Oli Scherer
2023-02-16 14:03:31 +00:00
parent 63c8d00090
commit 37e2f4f487
10 changed files with 33 additions and 37 deletions

View File

@@ -227,7 +227,7 @@ impl<'tcx> Queries<'tcx> {
self.codegen_backend().metadata_loader(),
&arenas,
);
let krate = passes::configure_and_expand(tcx, krate, &mut resolver)?;
let krate = passes::configure_and_expand(tcx, krate, &mut resolver);
// Make sure we don't mutate the cstore from here on.
tcx.untracked().cstore.leak();
@@ -245,8 +245,7 @@ impl<'tcx> Queries<'tcx> {
);
feed.resolutions(tcx.arena.alloc(untracked_resolutions));
feed.features_query(tcx.sess.features_untracked());
Ok(())
})?;
});
Ok(qcx)
})
}