aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/ty/infer.rs3
-rw-r--r--crates/ra_ide_api/src/hover.rs2
-rw-r--r--crates/ra_ide_api/src/mock_analysis.rs4
4 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index ed640d7fc..7d5d9b995 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 9228dd314..f47f4c5de 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);
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index 1edeb7579..48f1f49c9 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -88,7 +88,7 @@ impl HoverResult {
88fn hover_text(docs: Option<String>, desc: Option<String>) -> Option<String> { 88fn hover_text(docs: Option<String>, desc: Option<String>) -> Option<String> {
89 match (desc, docs) { 89 match (desc, docs) {
90 (Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)), 90 (Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)),
91 (None, Some(docs)) => Some(docs.to_string()), 91 (None, Some(docs)) => Some(docs),
92 _ => None, 92 _ => None,
93 } 93 }
94} 94}
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide_api/src/mock_analysis.rs
index 4dbbd489a..132f6f875 100644
--- a/crates/ra_ide_api/src/mock_analysis.rs
+++ b/crates/ra_ide_api/src/mock_analysis.rs
@@ -62,13 +62,13 @@ impl MockAnalysis {
62 pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition { 62 pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition {
63 let (offset, text) = extract_offset(text); 63 let (offset, text) = extract_offset(text);
64 let file_id = FileId((self.files.len() + 1) as u32); 64 let file_id = FileId((self.files.len() + 1) as u32);
65 self.files.push((path.to_string(), text.to_string())); 65 self.files.push((path.to_string(), text));
66 FilePosition { file_id, offset } 66 FilePosition { file_id, offset }
67 } 67 }
68 pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange { 68 pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange {
69 let (range, text) = extract_range(text); 69 let (range, text) = extract_range(text);
70 let file_id = FileId((self.files.len() + 1) as u32); 70 let file_id = FileId((self.files.len() + 1) as u32);
71 self.files.push((path.to_string(), text.to_string())); 71 self.files.push((path.to_string(), text));
72 FileRange { file_id, range } 72 FileRange { file_id, range }
73 } 73 }
74 pub fn id_of(&self, path: &str) -> FileId { 74 pub fn id_of(&self, path: &str) -> FileId {