aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/ty/infer.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index b27537151..b2fb5a563 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -169,7 +169,7 @@ impl ModuleSource {
169 (None, Some(item_id)) => { 169 (None, Some(item_id)) => {
170 let module = item_id.to_node(db); 170 let module = item_id.to_node(db);
171 assert!(module.item_list().is_some(), "expected inline module"); 171 assert!(module.item_list().is_some(), "expected inline module");
172 ModuleSource::Module(module.to_owned()) 172 ModuleSource::Module(module)
173 } 173 }
174 (None, None) => panic!(), 174 (None, None) => panic!(),
175 } 175 }
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 78aa76449..8322de0a8 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -895,8 +895,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
895 } 895 }
896 None => (receiver_ty, Ty::Unknown, None), 896 None => (receiver_ty, Ty::Unknown, None),
897 }; 897 };
898 let substs = 898 let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty);
899 self.substs_for_method_call(def_generics.clone(), generic_args, &derefed_receiver_ty);
900 let method_ty = method_ty.apply_substs(substs); 899 let method_ty = method_ty.apply_substs(substs);
901 let method_ty = self.insert_type_vars(method_ty); 900 let method_ty = self.insert_type_vars(method_ty);
902 self.register_obligations_for_call(&method_ty); 901 self.register_obligations_for_call(&method_ty);