Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/borrowck.rs')
-rw-r--r--crates/hir-ty/src/mir/borrowck.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/crates/hir-ty/src/mir/borrowck.rs b/crates/hir-ty/src/mir/borrowck.rs
index 85bf850566..eca6f4692a 100644
--- a/crates/hir-ty/src/mir/borrowck.rs
+++ b/crates/hir-ty/src/mir/borrowck.rs
@@ -132,7 +132,7 @@ fn moved_out_of_ref(db: &dyn HirDatabase, body: &MirBody) -> Vec<MovedOutOfRef>
ty,
db,
make_fetch_closure_field(db),
- body.owner.module(db.upcast()).krate(),
+ body.owner.module(db).krate(),
);
}
if is_dereference_of_ref
@@ -223,7 +223,7 @@ fn partially_moved(db: &dyn HirDatabase, body: &MirBody) -> Vec<PartiallyMoved>
ty,
db,
make_fetch_closure_field(db),
- body.owner.module(db.upcast()).krate(),
+ body.owner.module(db).krate(),
);
}
if !ty.clone().is_copy(db, body.owner)
@@ -369,12 +369,7 @@ fn place_case(db: &dyn HirDatabase, body: &MirBody, lvalue: &Place) -> Projectio
}
ProjectionElem::OpaqueCast(_) => (),
}
- ty = proj.projected_ty(
- ty,
- db,
- make_fetch_closure_field(db),
- body.owner.module(db.upcast()).krate(),
- );
+ ty = proj.projected_ty(ty, db, make_fetch_closure_field(db), body.owner.module(db).krate());
}
if is_part_of { ProjectionCase::DirectPart } else { ProjectionCase::Direct }
}
@@ -419,10 +414,7 @@ fn ever_initialized_map(
let Some(terminator) = &block.terminator else {
never!(
"Terminator should be none only in construction.\nThe body:\n{}",
- body.pretty_print(
- db,
- DisplayTarget::from_crate(db, body.owner.krate(db.upcast()))
- )
+ body.pretty_print(db, DisplayTarget::from_crate(db, body.owner.krate(db)))
);
return;
};