Uh oh!
There was an error while loading. Please reload this page.
resolve: Some module-related refactorings - #88872
Conversation
rust-highfive
commented
Sep 12, 2021
Some changes occurred in intra-doc-links. cc @jyn514 |
rust-highfive
commented
Sep 12, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The ModuleData::new used to set no_implicit_module to false. What are the consequences of this change in behaviour?
There was a problem hiding this comment.
For enums and traits there should be no consequences (we are jumping out of these modules during resolution and don't use their no_implicit_prelude flags), for foreign modules there may be some effect on macros 2.0 - identifiers from macros with def-site located in a foreign no_implicit_prelude module should now skip prelude during resolution.
However, because the #[no_implicit_prelude] attributes are still not applied to foreign modules the inherited value is always false, so no change in behavior right now.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Sep 15, 2021
I've included #88917 into this PR as well. |
cjgillot
commented
Sep 18, 2021
@bors r+ |
bors
commented
Sep 18, 2021
📌 Commit fd23c8348d27dbfe45916094306672a39c4c7e4a has been approved by |
bors
commented
Sep 22, 2021
⌛ Testing commit fd23c8348d27dbfe45916094306672a39c4c7e4a with merge 76a61b10ee24d792ad456dcb526d716df8833711... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
petrochenkov
commented
Sep 22, 2021
bors
commented
Sep 22, 2021
📌 Commit 61267440bbba0c29ef89e7bf988f77ab4a5abf16 has been approved by |
bors
commented
Sep 24, 2021
⌛ Testing commit 61267440bbba0c29ef89e7bf988f77ab4a5abf16 with merge 691dbccc3a019db5ce6b6d31f8216b37bef09e9e... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Construction of all modules is now centralized and performed by `fn new_module`.
The `Option<Module>` version is supported for the case where we don't know whether the `DefId` refers to a module or not. Non-local traits and enums are also correctly found now.
petrochenkov
commented
Sep 24, 2021
@bors r=cjgillot |
bors
commented
Sep 24, 2021
📌 Commit 8f035b8 has been approved by |
bors
commented
Sep 24, 2021
bors
commented
Sep 24, 2021
☀️ Test successful - checks-actions |
rust-timer
commented
Sep 25, 2021
Finished benchmarking commit (7342213): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
resolve: Cache module loading for all foreign modules It was previously cached for modules loaded from `fn get_module`, but not for modules loaded from `fn build_reduced_graph_for_external_crate_res`. This also makes all foreign modules use their real parent, span and expansion instead of possibly a parent/span/expansion of their reexport. Modules are also often compared using referential equality (`ptr::eq`), this change makes such comparisons correct in all cases. An ICE happening on attempt to decode expansions for foreign enums and traits is avoided. Also local enums and traits are now added to the module map. Follow up to rust-lang#88872. r? `@cjgillot`
See the individual commits.