resolve: Split Scope::Module into two scopes for non-glob and glob bindings by petrochenkov · Pull Request #149681 · rust-lang/rust (original) (raw)

This is a re-implementation of #144131 with all the issues mentioned there fixed.

As it turned out, the non-trivial part of the split was already done in c91b6ca, so the remaining part implemented in this PR is mostly mechanical.

After addressing the issue of already found bindings being lost due to indeterminacies in outer scopes (7e890bf) and adding one missing Stage::Late in Finalize the scope splitting refactoring just worked.
(One more ICE was revealed by the refactoring, but not caused by it, fixed up in the last commit.)

This is a part of implementation for the Open API proposal.