aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-22 14:28:55 +0000
committerAleksey Kladov <[email protected]>2019-12-22 14:28:55 +0000
commit558956c84be5e8752986bae001c7fd3f06cbe86d (patch)
treeb3234f4895fa63b190a78c0e99679ee52c3df8db /crates/ra_hir_def/src/nameres
parent2c60f42825e68d8133854d378d9550139c71d9b4 (diff)
Remove import field
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 745e31c0d..3706c1223 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -218,7 +218,7 @@ where
218 self.update( 218 self.update(
219 self.def_map.root, 219 self.def_map.root,
220 None, 220 None,
221 &[(name, Resolution { def: PerNs::macros(macro_), import: false })], 221 &[(name, Resolution { def: PerNs::macros(macro_) })],
222 ); 222 );
223 } 223 }
224 } 224 }
@@ -401,10 +401,8 @@ where
401 .map(|(local_id, variant_data)| { 401 .map(|(local_id, variant_data)| {
402 let name = variant_data.name.clone(); 402 let name = variant_data.name.clone();
403 let variant = EnumVariantId { parent: e, local_id }; 403 let variant = EnumVariantId { parent: e, local_id };
404 let res = Resolution { 404 let res =
405 def: PerNs::both(variant.into(), variant.into()), 405 Resolution { def: PerNs::both(variant.into(), variant.into()) };
406 import: true,
407 };
408 (name, res) 406 (name, res)
409 }) 407 })
410 .collect::<Vec<_>>(); 408 .collect::<Vec<_>>();
@@ -430,7 +428,7 @@ where
430 } 428 }
431 } 429 }
432 430
433 let resolution = Resolution { def, import: true }; 431 let resolution = Resolution { def };
434 self.update(module_id, Some(import_id), &[(name, resolution)]); 432 self.update(module_id, Some(import_id), &[(name, resolution)]);
435 } 433 }
436 None => tested_by!(bogus_paths), 434 None => tested_by!(bogus_paths),
@@ -717,7 +715,7 @@ where
717 let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: res }; 715 let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: res };
718 let def: ModuleDefId = module.into(); 716 let def: ModuleDefId = module.into();
719 self.def_collector.def_map.modules[self.module_id].scope.define_def(def); 717 self.def_collector.def_map.modules[self.module_id].scope.define_def(def);
720 let resolution = Resolution { def: def.into(), import: false }; 718 let resolution = Resolution { def: def.into() };
721 self.def_collector.update(self.module_id, None, &[(name, resolution)]); 719 self.def_collector.update(self.module_id, None, &[(name, resolution)]);
722 res 720 res
723 } 721 }
@@ -777,7 +775,7 @@ where
777 .into(), 775 .into(),
778 }; 776 };
779 self.def_collector.def_map.modules[self.module_id].scope.define_def(def); 777 self.def_collector.def_map.modules[self.module_id].scope.define_def(def);
780 let resolution = Resolution { def: def.into(), import: false }; 778 let resolution = Resolution { def: def.into() };
781 self.def_collector.update(self.module_id, None, &[(name, resolution)]) 779 self.def_collector.update(self.module_id, None, &[(name, resolution)])
782 } 780 }
783 781