Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/expr.rs')
-rw-r--r--crates/hir-ty/src/infer/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs
index 9d8096d32f..d4b6999614 100644
--- a/crates/hir-ty/src/infer/expr.rs
+++ b/crates/hir-ty/src/infer/expr.rs
@@ -1245,7 +1245,7 @@ impl InferenceContext<'_> {
.build();
self.write_method_resolution(tgt_expr, func, subst.clone());
- let method_ty = self.db.value_ty(func.into()).substitute(Interner, &subst);
+ let method_ty = self.db.value_ty(func.into()).unwrap().substitute(Interner, &subst);
self.register_obligations_for_call(&method_ty);
self.infer_expr_coerce(rhs, &Expectation::has_type(rhs_ty.clone()));
@@ -1541,7 +1541,7 @@ impl InferenceContext<'_> {
self.check_method_call(
tgt_expr,
&[],
- self.db.value_ty(func.into()),
+ self.db.value_ty(func.into()).unwrap(),
substs,
ty,
expected,
@@ -1586,7 +1586,7 @@ impl InferenceContext<'_> {
item: func.into(),
})
}
- (ty, self.db.value_ty(func.into()), substs)
+ (ty, self.db.value_ty(func.into()).unwrap(), substs)
}
None => {
let field_with_same_name_exists = match self.lookup_field(&receiver_ty, method_name)