aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/descriptors/module/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/descriptors/module/mod.rs')
-rw-r--r--crates/ra_analysis/src/descriptors/module/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/descriptors/module/mod.rs b/crates/ra_analysis/src/descriptors/module/mod.rs
index 3d799ba05..03330240d 100644
--- a/crates/ra_analysis/src/descriptors/module/mod.rs
+++ b/crates/ra_analysis/src/descriptors/module/mod.rs
@@ -117,7 +117,7 @@ impl ModuleId {
117 .filter_map(|&it| { 117 .filter_map(|&it| {
118 let p = tree.link(it).problem.clone()?; 118 let p = tree.link(it).problem.clone()?;
119 let s = it.bind_source(tree, db); 119 let s = it.bind_source(tree, db);
120 let s = s.ast().name().unwrap().syntax().owned(); 120 let s = s.borrowed().name().unwrap().syntax().owned();
121 Some((s, p)) 121 Some((s, p))
122 }) 122 })
123 .collect() 123 .collect()
@@ -136,11 +136,11 @@ impl LinkId {
136 let owner = self.owner(tree); 136 let owner = self.owner(tree);
137 match owner.source(tree).resolve(db) { 137 match owner.source(tree).resolve(db) {
138 ModuleSourceNode::Root(root) => { 138 ModuleSourceNode::Root(root) => {
139 let ast = imp::modules(root.ast()) 139 let ast = imp::modules(root.borrowed())
140 .find(|(name, _)| name == &tree.link(self).name) 140 .find(|(name, _)| name == &tree.link(self).name)
141 .unwrap() 141 .unwrap()
142 .1; 142 .1;
143 ast.into() 143 ast.owned()
144 } 144 }
145 ModuleSourceNode::Inline(it) => it, 145 ModuleSourceNode::Inline(it) => it,
146 } 146 }
@@ -179,13 +179,13 @@ impl ModuleSource {
179 match self { 179 match self {
180 ModuleSource::File(file_id) => { 180 ModuleSource::File(file_id) => {
181 let syntax = db.file_syntax(file_id); 181 let syntax = db.file_syntax(file_id);
182 ModuleSourceNode::Root(syntax.ast().into()) 182 ModuleSourceNode::Root(syntax.ast().owned())
183 } 183 }
184 ModuleSource::Inline(ptr) => { 184 ModuleSource::Inline(ptr) => {
185 let syntax = db.resolve_syntax_ptr(ptr); 185 let syntax = db.resolve_syntax_ptr(ptr);
186 let syntax = syntax.borrowed(); 186 let syntax = syntax.borrowed();
187 let module = ast::Module::cast(syntax).unwrap(); 187 let module = ast::Module::cast(syntax).unwrap();
188 ModuleSourceNode::Inline(module.into()) 188 ModuleSourceNode::Inline(module.owned())
189 } 189 }
190 } 190 }
191 } 191 }