1
Fork 0

Rename CodegenUnit::work_product to previous_work_product

It returns the previous work product or panics if there is none. This rename
makes the purpose of this method clearer.
This commit is contained in:
bjorn3 2022-05-13 10:32:03 +00:00
parent 85136dbe56
commit 02162c4163
3 changed files with 4 additions and 4 deletions

View file

@ -336,7 +336,7 @@ impl<'tcx> CodegenUnit<'tcx> {
WorkProductId::from_cgu_name(self.name().as_str())
}
pub fn work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct {
pub fn previous_work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct {
let work_product_id = self.work_product_id();
tcx.dep_graph
.previous_work_product(&work_product_id)