From 42be05a335f21fa2d0f2225ffc29482d2c995316 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 18 Jun 2020 16:02:45 +0200 Subject: Simplify --- crates/ra_hir_def/src/nameres/collector.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/nameres/collector.rs') diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 976e5e585..77baa4c69 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -825,7 +825,10 @@ impl ModCollector<'_, '_> { let modules = &mut self.def_collector.def_map.modules; let res = modules.alloc(ModuleData::default()); modules[res].parent = Some(self.module_id); - modules[res].origin = ModuleOrigin::not_sure_file(definition, declaration); + modules[res].origin = match definition { + None => ModuleOrigin::Inline { definition: declaration }, + Some(definition) => ModuleOrigin::File { declaration, definition }, + }; for (name, mac) in modules[self.module_id].scope.collect_legacy_macros() { modules[res].scope.define_legacy_macro(name, mac) } -- cgit v1.2.3