mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
89bec2cd37
resolve: Introduce `(Local,Extern)Module` newtypes for local and external modules respectively Right now both `LocalModule` and `ExternModule` refer to the same `ModuleData`, but the module data for local and extern modules can potentially be made quite different, and we can specialize name lookup for both cases as an optimization. Declaration creation for local and external modules was already specialized as a part of the parallel import resolution work (see `define_local` and `define_extern`, rust-lang/rust#145108 and previous PRs), because they have different properties with regards to ownership and synchronization.