Remove visibility information from HIR#93970
Conversation
|
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Apparently some imports still miss their visibility entries in the table. |
This comment has been minimized.
This comment has been minimized.
compiler/rustc_lint/src/builtin.rs
Outdated
There was a problem hiding this comment.
Looks like this whole arm can be removed now (including this comment).
There was a problem hiding this comment.
Wouldn't removing this arm will change behaviour?
There was a problem hiding this comment.
Maybe, but it still looks like a reasonable change.
It can be done in a separate PR.
|
r=me after addressing the remaining comments and squashing commits. |
|
This PR introduces untracked information in metadata. As visibility is not in the HIR any more, it's not in the crate_hash, and will create incr comp ICEs in downstream crates. I'll add an extra commit to adress this. |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
|
⌛ Trying commit 1d2707f49db710409cb70bf7cedda3bfc7e28fa7 with merge 5a9e9f6c9170cf730f258de9ecbaac918bf4a913... |
|
☀️ Try build successful - checks-actions |
|
This version hashes visibility information into the crate hash, so should be sound in terms of metadata, unblocking. |
compiler/rustc_middle/src/ty/mod.rs
Outdated
There was a problem hiding this comment.
Shouldn't it be included into the crate hash too?
There was a problem hiding this comment.
It is only used to emit a diagnostic, which won't appear in metadata. Therefore, it does not need to appear in crate_hash. I can include it as a safety precaution.
|
r=me after addressing #93970 (comment) and squashing commits. |
|
@bors r=petrochenkov |
|
📌 Commit 0a6e135 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (143eaa8): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
|
This PR removes redundant information from the HIR to directly use the resolver outputs. The regression only appears on |
The resolver exports all the necessary visibility information through the
tcx.visibilityquery.This PR stops having a dedicated visibility field in HIR, in order to use this query.
We keep a
vis_spanfield for diagnostic purposes.