mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-27 20:35:09 +00:00
internal: remove deprecated fn
This commit is contained in:
parent
d40cf52e6d
commit
67a7dfda43
1 changed files with 3 additions and 3 deletions
|
@ -1625,14 +1625,14 @@ impl ModCollector<'_, '_> {
|
||||||
.resolve_visibility(self.def_collector.db, self.module_id, visibility)
|
.resolve_visibility(self.def_collector.db, self.module_id, visibility)
|
||||||
.unwrap_or(Visibility::Public);
|
.unwrap_or(Visibility::Public);
|
||||||
let modules = &mut self.def_collector.def_map.modules;
|
let modules = &mut self.def_collector.def_map.modules;
|
||||||
let res = modules.alloc(ModuleData::default());
|
let origin = match definition {
|
||||||
modules[res].parent = Some(self.module_id);
|
|
||||||
modules[res].origin = match definition {
|
|
||||||
None => ModuleOrigin::Inline { definition: declaration },
|
None => ModuleOrigin::Inline { definition: declaration },
|
||||||
Some((definition, is_mod_rs)) => {
|
Some((definition, is_mod_rs)) => {
|
||||||
ModuleOrigin::File { declaration, definition, is_mod_rs }
|
ModuleOrigin::File { declaration, definition, is_mod_rs }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let res = modules.alloc(ModuleData::new(origin));
|
||||||
|
modules[res].parent = Some(self.module_id);
|
||||||
for (name, mac) in modules[self.module_id].scope.collect_legacy_macros() {
|
for (name, mac) in modules[self.module_id].scope.collect_legacy_macros() {
|
||||||
modules[res].scope.define_legacy_macro(name, mac)
|
modules[res].scope.define_legacy_macro(name, mac)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue