-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Correctly handle path stability for 'use tree' items #99292
Conversation
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
cc @yaahc |
PR rust-lang#5956 started checking the stability of path segments. However, this was not applied to 'use tree' items (e.g. 'use some::path::{ItemOne, ItemTwo}') due to the way that we desugar these items in HIR lowering. This PR modifies 'use tree' lowering to preserve resolution information, which is needed by stability checking.
0ba18e4
to
c7b31d0
Compare
r=me if all the libs-team stability questions are resolved |
cc @rust-lang/libs Are there any concerns about merging this? |
Since this is waiting on the libs team ... r? libs |
lgtm @bors r=cjgillot |
☀️ Test successful - checks-actions |
Finished benchmarking commit (46244f3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
avoid clone path prefix when lowering to hir Found this while trying to parallelize `lower_to_hir`. When lowering to hir, `Nested` paths in `ast` will be split and the prefix segments will be cloned. This could be omited, since the only consequence is that the prefix segments in `Path`s in hir will have the same `HirId`s, and it seems harmless. This simplifies the process of lowering to hir and avoids re-modification of `ResolverAstLowering`. r? `@Aaron1011` cc rust-lang#99292
avoid clone path prefix when lowering to hir Found this while trying to parallelize `lower_to_hir`. When lowering to hir, `Nested` paths in `ast` will be split and the prefix segments will be cloned. This could be omited, since the only consequence is that the prefix segments in `Path`s in hir will have the same `HirId`s, and it seems harmless. This simplifies the process of lowering to hir and avoids re-modification of `ResolverAstLowering`. r? `@Aaron1011` cc rust-lang#99292
PR #95956 started checking the stability of path segments.
However, this was not applied to 'use tree' items
(e.g. 'use some::path::{ItemOne, ItemTwo}') due to the way
that we desugar these items in HIR lowering.
This PR modifies 'use tree' lowering to preserve resolution
information, which is needed by stability checking.