-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make privacy checking, intrinsic checking and liveness checking incremental #57253
Conversation
@bors try |
⌛ Trying commit 31241cedc0d9fc3d3cb8f29cfea9150ec57c3cb1 with merge d9689e3fc0e3cbf86c95524c2672ce17f9fb4cac... |
☀️ Test successful - status-travis |
@rust-timer build d9689e3fc0e3cbf86c95524c2672ce17f9fb4cac |
Success: Queued d9689e3fc0e3cbf86c95524c2672ce17f9fb4cac with parent 9653034, comparison URL. |
Finished benchmarking try commit d9689e3fc0e3cbf86c95524c2672ce17f9fb4cac |
☔ The latest upstream changes (presumably #51487) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors try |
⌛ Trying commit 959c870 with merge 9fcae8a0e896f370b12630f6fa9fef24ead2f08a... |
@rust-timer build 9fcae8a0e896f370b12630f6fa9fef24ead2f08a |
Success: Queued 9fcae8a0e896f370b12630f6fa9fef24ead2f08a with parent 9aee7ed, comparison URL. |
Finished benchmarking try commit 9fcae8a0e896f370b12630f6fa9fef24ead2f08a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Zoxc! Looks great! I left a couple of minor nits, r=me with those addressed.
Oh my, adding a query needs a lot of boilerplate ...
src/librustc_privacy/lib.rs
Outdated
|
||
let krate = tcx.hir().krate(); | ||
|
||
for &module in tcx.hir().krate().modules.keys() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you re-use the krate
binding here that is created the line before. Otherwise it might be confusing, i.e. one might think that's some special reason why tcx.hir().krate()
is called twice here.
src/librustc_privacy/lib.rs
Outdated
@@ -782,6 +782,10 @@ impl<'a, 'tcx> Visitor<'tcx> for NamePrivacyVisitor<'a, 'tcx> { | |||
NestedVisitorMap::All(&self.tcx.hir()) | |||
} | |||
|
|||
fn visit_mod(&mut self, _m: &'tcx hir::Mod, _s: Span, _n: ast::NodeId) { | |||
// Don't visit modules inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can explain in the comment why we are not recursing down into nested modules? Something like "Don't visit nested modules, since we run a separate visitor walk for each module in privacy_access_levels()
".
src/librustc_privacy/lib.rs
Outdated
@@ -917,6 +921,10 @@ impl<'a, 'tcx> Visitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> { | |||
NestedVisitorMap::All(&self.tcx.hir()) | |||
} | |||
|
|||
fn visit_mod(&mut self, _m: &'tcx hir::Mod, _s: Span, _n: ast::NodeId) { | |||
// Don't visit modules inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, just copying the comment is fine.
@bors r=michaelwoerister |
📌 Commit 959c870 has been approved by |
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on rust-lang#51487 r? @michaelwoerister
Rollup of 7 pull requests Successful merges: - #57253 (Make privacy checking, intrinsic checking and liveness checking incremental) - #57352 (forbid manually impl'ing one of an object type's marker traits) - #57537 (Small perf improvement for fmt) - #57579 (Add core::iter::once_with()) - #57587 (Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test) - #57608 (Simplify 'product' factorial example) - #57614 ([rustdoc] Fix crates filtering box not being filled) Failed merges: r? @ghost
@bors r=michaelwoerister |
📌 Commit e301f90 has been approved by |
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on rust-lang#51487 r? @michaelwoerister
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on rust-lang#51487 r? @michaelwoerister
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on rust-lang#51487 r? @michaelwoerister
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on #51487 r? @michaelwoerister
☀️ Test successful - checks-travis, status-appveyor |
[WIP] Make some lints incremental Blocked on #57253 r? @michaelwoerister
Make some lints incremental Blocked on #57253 r? @michaelwoerister
Make some lints incremental Blocked on #57253 r? @michaelwoerister
Make some lints incremental Blocked on #57253 r? @michaelwoerister
Make some lints incremental Blocked on rust-lang#57253 r? @michaelwoerister
Make some lints incremental Blocked on rust-lang#57253 r? @michaelwoerister
Make some lints incremental Blocked on rust-lang#57253 r? @michaelwoerister
Make some lints incremental Blocked on rust-lang#57253 r? @michaelwoerister
Blocked on #51487
r? @michaelwoerister