aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs4
-rw-r--r--crates/ra_hir/src/docs.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index e920256e5..1a33127fa 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -210,11 +210,11 @@ impl Module {
210 pub fn declaration_source( 210 pub fn declaration_source(
211 self, 211 self,
212 db: &(impl DefDatabase + AstDatabase), 212 db: &(impl DefDatabase + AstDatabase),
213 ) -> Option<(HirFileId, TreeArc<ast::Module>)> { 213 ) -> Option<Source<TreeArc<ast::Module>>> {
214 let def_map = db.crate_def_map(self.krate); 214 let def_map = db.crate_def_map(self.krate);
215 let decl = def_map[self.module_id].declaration?; 215 let decl = def_map[self.module_id].declaration?;
216 let ast = decl.to_node(db); 216 let ast = decl.to_node(db);
217 Some((decl.file_id(), ast)) 217 Some((decl.file_id(), ast).into())
218 } 218 }
219 219
220 /// Returns the syntax of the last path segment corresponding to this import 220 /// Returns the syntax of the last path segment corresponding to this import
diff --git a/crates/ra_hir/src/docs.rs b/crates/ra_hir/src/docs.rs
index ae82d55a5..4db066c43 100644
--- a/crates/ra_hir/src/docs.rs
+++ b/crates/ra_hir/src/docs.rs
@@ -71,7 +71,7 @@ pub(crate) fn documentation_query(
71 def: DocDef, 71 def: DocDef,
72) -> Option<Documentation> { 72) -> Option<Documentation> {
73 match def { 73 match def {
74 DocDef::Module(it) => docs_from_ast(&*it.declaration_source(db)?.1), 74 DocDef::Module(it) => docs_from_ast(&*it.declaration_source(db)?.ast),
75 DocDef::StructField(it) => match it.source(db).ast { 75 DocDef::StructField(it) => match it.source(db).ast {
76 FieldSource::Named(named) => docs_from_ast(&*named), 76 FieldSource::Named(named) => docs_from_ast(&*named),
77 FieldSource::Pos(..) => return None, 77 FieldSource::Pos(..) => return None,