aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/raw.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres/raw.rs')
-rw-r--r--crates/ra_hir/src/nameres/raw.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs
index 584e15e29..2f973359f 100644
--- a/crates/ra_hir/src/nameres/raw.rs
+++ b/crates/ra_hir/src/nameres/raw.rs
@@ -207,24 +207,24 @@ impl RawItemsCollector {
207 } 207 }
208 208
209 fn add_item(&mut self, current_module: Option<Module>, item: ast::ModuleItem) { 209 fn add_item(&mut self, current_module: Option<Module>, item: ast::ModuleItem) {
210 let (kind, name) = match item.kind() { 210 let (kind, name) = match item {
211 ast::ModuleItemKind::Module(module) => { 211 ast::ModuleItem::Module(module) => {
212 self.add_module(current_module, module); 212 self.add_module(current_module, module);
213 return; 213 return;
214 } 214 }
215 ast::ModuleItemKind::UseItem(use_item) => { 215 ast::ModuleItem::UseItem(use_item) => {
216 self.add_use_item(current_module, use_item); 216 self.add_use_item(current_module, use_item);
217 return; 217 return;
218 } 218 }
219 ast::ModuleItemKind::ExternCrateItem(extern_crate) => { 219 ast::ModuleItem::ExternCrateItem(extern_crate) => {
220 self.add_extern_crate_item(current_module, extern_crate); 220 self.add_extern_crate_item(current_module, extern_crate);
221 return; 221 return;
222 } 222 }
223 ast::ModuleItemKind::ImplBlock(_) => { 223 ast::ModuleItem::ImplBlock(_) => {
224 // impls don't participate in name resolution 224 // impls don't participate in name resolution
225 return; 225 return;
226 } 226 }
227 ast::ModuleItemKind::StructDef(it) => { 227 ast::ModuleItem::StructDef(it) => {
228 let id = self.source_ast_id_map.ast_id(&it); 228 let id = self.source_ast_id_map.ast_id(&it);
229 let name = it.name(); 229 let name = it.name();
230 if it.is_union() { 230 if it.is_union() {
@@ -233,22 +233,22 @@ impl RawItemsCollector {
233 (DefKind::Struct(id), name) 233 (DefKind::Struct(id), name)
234 } 234 }
235 } 235 }
236 ast::ModuleItemKind::EnumDef(it) => { 236 ast::ModuleItem::EnumDef(it) => {
237 (DefKind::Enum(self.source_ast_id_map.ast_id(&it)), it.name()) 237 (DefKind::Enum(self.source_ast_id_map.ast_id(&it)), it.name())
238 } 238 }
239 ast::ModuleItemKind::FnDef(it) => { 239 ast::ModuleItem::FnDef(it) => {
240 (DefKind::Function(self.source_ast_id_map.ast_id(&it)), it.name()) 240 (DefKind::Function(self.source_ast_id_map.ast_id(&it)), it.name())
241 } 241 }
242 ast::ModuleItemKind::TraitDef(it) => { 242 ast::ModuleItem::TraitDef(it) => {
243 (DefKind::Trait(self.source_ast_id_map.ast_id(&it)), it.name()) 243 (DefKind::Trait(self.source_ast_id_map.ast_id(&it)), it.name())
244 } 244 }
245 ast::ModuleItemKind::TypeAliasDef(it) => { 245 ast::ModuleItem::TypeAliasDef(it) => {
246 (DefKind::TypeAlias(self.source_ast_id_map.ast_id(&it)), it.name()) 246 (DefKind::TypeAlias(self.source_ast_id_map.ast_id(&it)), it.name())
247 } 247 }
248 ast::ModuleItemKind::ConstDef(it) => { 248 ast::ModuleItem::ConstDef(it) => {
249 (DefKind::Const(self.source_ast_id_map.ast_id(&it)), it.name()) 249 (DefKind::Const(self.source_ast_id_map.ast_id(&it)), it.name())
250 } 250 }
251 ast::ModuleItemKind::StaticDef(it) => { 251 ast::ModuleItem::StaticDef(it) => {
252 (DefKind::Static(self.source_ast_id_map.ast_id(&it)), it.name()) 252 (DefKind::Static(self.source_ast_id_map.ast_id(&it)), it.name())
253 } 253 }
254 }; 254 };