diff options
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 1a8db0ea0..3f16e9566 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -120,8 +120,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
120 | ast::StructDef(it) => { | 120 | ast::StructDef(it) => { |
121 | Some(NavigationTarget::from_named( | 121 | Some(NavigationTarget::from_named( |
122 | db, | 122 | db, |
123 | node.file_id, | 123 | node.with_ast(&it), |
124 | &it, | ||
125 | it.doc_comment_text(), | 124 | it.doc_comment_text(), |
126 | it.short_label(), | 125 | it.short_label(), |
127 | )) | 126 | )) |
@@ -129,8 +128,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
129 | ast::EnumDef(it) => { | 128 | ast::EnumDef(it) => { |
130 | Some(NavigationTarget::from_named( | 129 | Some(NavigationTarget::from_named( |
131 | db, | 130 | db, |
132 | node.file_id, | 131 | node.with_ast(&it), |
133 | &it, | ||
134 | it.doc_comment_text(), | 132 | it.doc_comment_text(), |
135 | it.short_label(), | 133 | it.short_label(), |
136 | )) | 134 | )) |
@@ -138,8 +136,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
138 | ast::EnumVariant(it) => { | 136 | ast::EnumVariant(it) => { |
139 | Some(NavigationTarget::from_named( | 137 | Some(NavigationTarget::from_named( |
140 | db, | 138 | db, |
141 | node.file_id, | 139 | node.with_ast(&it), |
142 | &it, | ||
143 | it.doc_comment_text(), | 140 | it.doc_comment_text(), |
144 | it.short_label(), | 141 | it.short_label(), |
145 | )) | 142 | )) |
@@ -147,8 +144,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
147 | ast::FnDef(it) => { | 144 | ast::FnDef(it) => { |
148 | Some(NavigationTarget::from_named( | 145 | Some(NavigationTarget::from_named( |
149 | db, | 146 | db, |
150 | node.file_id, | 147 | node.with_ast(&it), |
151 | &it, | ||
152 | it.doc_comment_text(), | 148 | it.doc_comment_text(), |
153 | it.short_label(), | 149 | it.short_label(), |
154 | )) | 150 | )) |
@@ -156,8 +152,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
156 | ast::TypeAliasDef(it) => { | 152 | ast::TypeAliasDef(it) => { |
157 | Some(NavigationTarget::from_named( | 153 | Some(NavigationTarget::from_named( |
158 | db, | 154 | db, |
159 | node.file_id, | 155 | node.with_ast(&it), |
160 | &it, | ||
161 | it.doc_comment_text(), | 156 | it.doc_comment_text(), |
162 | it.short_label(), | 157 | it.short_label(), |
163 | )) | 158 | )) |
@@ -165,8 +160,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
165 | ast::ConstDef(it) => { | 160 | ast::ConstDef(it) => { |
166 | Some(NavigationTarget::from_named( | 161 | Some(NavigationTarget::from_named( |
167 | db, | 162 | db, |
168 | node.file_id, | 163 | node.with_ast(&it), |
169 | &it, | ||
170 | it.doc_comment_text(), | 164 | it.doc_comment_text(), |
171 | it.short_label(), | 165 | it.short_label(), |
172 | )) | 166 | )) |
@@ -174,8 +168,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
174 | ast::StaticDef(it) => { | 168 | ast::StaticDef(it) => { |
175 | Some(NavigationTarget::from_named( | 169 | Some(NavigationTarget::from_named( |
176 | db, | 170 | db, |
177 | node.file_id, | 171 | node.with_ast(&it), |
178 | &it, | ||
179 | it.doc_comment_text(), | 172 | it.doc_comment_text(), |
180 | it.short_label(), | 173 | it.short_label(), |
181 | )) | 174 | )) |
@@ -183,8 +176,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
183 | ast::TraitDef(it) => { | 176 | ast::TraitDef(it) => { |
184 | Some(NavigationTarget::from_named( | 177 | Some(NavigationTarget::from_named( |
185 | db, | 178 | db, |
186 | node.file_id, | 179 | node.with_ast(&it), |
187 | &it, | ||
188 | it.doc_comment_text(), | 180 | it.doc_comment_text(), |
189 | it.short_label(), | 181 | it.short_label(), |
190 | )) | 182 | )) |
@@ -192,8 +184,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
192 | ast::RecordFieldDef(it) => { | 184 | ast::RecordFieldDef(it) => { |
193 | Some(NavigationTarget::from_named( | 185 | Some(NavigationTarget::from_named( |
194 | db, | 186 | db, |
195 | node.file_id, | 187 | node.with_ast(&it), |
196 | &it, | ||
197 | it.doc_comment_text(), | 188 | it.doc_comment_text(), |
198 | it.short_label(), | 189 | it.short_label(), |
199 | )) | 190 | )) |
@@ -201,8 +192,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
201 | ast::Module(it) => { | 192 | ast::Module(it) => { |
202 | Some(NavigationTarget::from_named( | 193 | Some(NavigationTarget::from_named( |
203 | db, | 194 | db, |
204 | node.file_id, | 195 | node.with_ast(&it), |
205 | &it, | ||
206 | it.doc_comment_text(), | 196 | it.doc_comment_text(), |
207 | it.short_label(), | 197 | it.short_label(), |
208 | )) | 198 | )) |
@@ -210,8 +200,7 @@ fn named_target(db: &RootDatabase, node: Source<&SyntaxNode>) -> Option<Navigati | |||
210 | ast::MacroCall(it) => { | 200 | ast::MacroCall(it) => { |
211 | Some(NavigationTarget::from_named( | 201 | Some(NavigationTarget::from_named( |
212 | db, | 202 | db, |
213 | node.file_id, | 203 | node.with_ast(&it), |
214 | &it, | ||
215 | it.doc_comment_text(), | 204 | it.doc_comment_text(), |
216 | None, | 205 | None, |
217 | )) | 206 | )) |