-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Introduce Scope::NonGlobModule and Scope::GlobModule #144131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
f1097bc
to
c3185be
Compare
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like rust-lang#144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like rust-lang#144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like rust-lang#144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like rust-lang#144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
Rollup merge of #144368 - petrochenkov:rmrootscope, r=b-naber resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like #144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
☔ The latest upstream changes (presumably #144440) made this pull request unmergeable. Please resolve the merge conflicts. |
resolve: Remove `Scope::CrateRoot` Use `Scope::Module` with the crate root module inside instead, which should be identical. This is a simplification by itself, but it will be even larger simplification if something like rust-lang/rust#144131 is implemented, because `Scope::CrateRoot` is also a module with two actual scopes in it (for globs and non-globs). I also did some renamings for consistency: - `ScopeSet::AbsolutePath` -> `ScopeSet::ModuleAndExternPrelude` - `ModuleOrUniformRoot::CrateRootAndExternPrelude` -> `ModuleOrUniformRoot::ModuleAndExternPrelude` - `is_absolute_path` -> `module_and_extern_prelude`
c3185be
to
9c0ee44
Compare
@petrochenkov do you have time to review this in the next couple of days? |
Probably after #144579, this is low priority for me. |
I figured, I'll just re-roll then. r? @rust-lang/compiler |
I still need to look, this is an important part of the resolve infrastructure. |
Other maintainers are also qualified to review this code. PR writers are allowed to re-roll reviewers after 2 weeks of inactivity; the fact that you just ignore this is kind of wild. |
Vadim is the foremost expert on name resolution in the compiler, and if he wants to take a look at the PR, that is completely fine. No one is taking away your option of rerolling, but that doesn't mean that you get to choose the only reviewer. If there are other people with concerns or comments, their input also has to be taken into account, regardless of whether they are the currently assigned reviewer or not. |
(Btw you just pinged the entire compiler team, more than 50 people. The way to re-roll is |
I understand, but there must be some limit for how long someone can request to take a look at a PR; if the PR has low priority for the maintainer requesting a review, at some point there should still be a way to get this merged in a reasonable amount of time. Now obviously 2 weeks isn't anywhere close to such a limit, so I apologize for overreacting here. |
I'm certainly going to review this in some time. |
#144793 splits extern prelude into two scopes and demonstrates some things that need to be done for the module scope split as well.
|
Splits
Scope::Module
intoScope::NonGlobModule
andScope::GlobModule
. This makes it easier to implement the open namespaces project, where we have to introduce a third scope. Introducing two separate scopes for a module was also a change requested by @petrochenkov, and should make it easier to output better diagnostics.r? @petrochenkov