Fixes wrong unreachable_pub lints on nested and glob public reexport#87487
Fixes wrong unreachable_pub lints on nested and glob public reexport#87487bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
|
I've had one test weirdly failing locally in the |
This comment has been minimized.
This comment has been minimized.
32d0081 to
3c5d0e8
Compare
|
What I wanted to achieve with #82064 is assigning all |
|
@petrochenkov Hey, good evening! I've been able to look at the necessary work during the week. Would that basically involve moving a big chunk of the code from the I already have some local changes towards that goal but I prefer to ask before sinking too much time in the wrong direction |
|
Most of |
3c5d0e8 to
32eaff5
Compare
|
@petrochenkov Mmmh, I've noticed what I think is a major blocker. As far as I know, I cannot correctly resolve the access level of rust/compiler/rustc_privacy/src/lib.rs Lines 639 to 641 in 8759f00 Current workarounds I found are:
My last push contains those changes (I still need to see how to handle macros so it's not finished yet) |
32eaff5 to
86bd891
Compare
This comment has been minimized.
This comment has been minimized.
|
Ah, right, impls can also be public or exported. |
rustc: Replace `HirId`s with `LocalDefId`s in `AccessLevels` tables and passes using those tables - primarily privacy checking, stability checking and dead code checking. All these passes work with definitions rather than with arbitrary HIR nodes. r? `@cjgillot` cc `@lambinoo` (rust-lang#87487)
86bd891 to
b888dc9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Perf is fine. |
9fd1731 to
d4a21fe
Compare
|
I started to rework that weird way I get @rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
Nothing changed since the previous review? |
|
@petrochenkov Oh... I thought I squashed all those commits down.. my bad. Squashed, pushed! Thanks a lot for your time as always! |
This comment has been minimized.
This comment has been minimized.
|
By the way you should be able to rebase now to pull in the rustfmt updates |
|
I cannot r+ this until the failing test on CI is fixed. |
|
Clippy tests can be run with |
This comment has been minimized.
This comment has been minimized.
Mak DefId to AccessLevel map in resolve for export hir_id to accesslevel in resolve and applied in privacy using local def id removing tracing probes making function not recursive and adding comments Move most of Exported/Public res to rustc_resolve moving public/export res to resolve fix missing stability attributes in core, std and alloc move code to access_levels.rs return for some kinds instead of going through them Export correctness, macro changes, comments add comment for import binding add comment for import binding renmae to access level visitor, remove comments, move fn as closure, remove new_key fmt fix rebase fix rebase fmt fmt fix: move macro def to rustc_resolve fix: reachable AccessLevel for enum variants fmt fix: missing stability attributes for other architectures allow unreachable pub in rustfmt fix: missing impl access level + renaming export to reexport Missing impl access level was found thanks to a test in clippy
|
@lambinoo |
|
I noticed a small mistake in the rustc_pricacy code. A line disappeared when I shuffled some code around. I forgot to update the access level of the impl in visit_item (L650). I found this in the most overkill way by having the compiler dump the access level structure and doing a diff between this branch and master... And a lot of impl that should have been public were missing. |
|
Great, hopefully it will pass now. |
|
📌 Commit 3a77bb8 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (df035a3): comparison url. Summary: This change led to moderate relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
|
Success! Gosh this one has been cooking for a while. I'll be working on improving the whole resolution thing now but I think the two linked issues can be closed now! |
Linked issues: #64762 & #82064