-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
cleanup mir visitor for rustc::pass_by_value
#98766
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
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.
None of my comments should be applied in this PR, there's probably many more that could be addressed that way.
r=me with CI happy
fn visit_ascribe_user_ty( | ||
&mut self, | ||
place: & $($mutability)? Place<'tcx>, | ||
variance: & $($mutability)? ty::Variance, |
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.
variance is a trivial enum and could benefit from this, too
location: Location) { | ||
fn visit_ascribe_user_ty( | ||
&mut self, | ||
place: & $($mutability)? Place<'tcx>, |
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.
place small, so passing them by value should be ok (two ptr-sized things instead of one)
location: Location) { | ||
fn visit_retag( | ||
&mut self, | ||
kind: & $($mutability)? RetagKind, |
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.
also a trivial enum that could be passed by value.. although it isn't Copy, maybe that's just an oversight?
@bors r=oli-obk |
📌 Commit cf9c0a5 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#98639 (Factor out `hir::Node::Binding`) - rust-lang#98653 (Add regression test for rust-lang#79494) - rust-lang#98763 (bootstrap: illumos platform flags for split-debuginfo) - rust-lang#98766 (cleanup mir visitor for `rustc::pass_by_value`) - rust-lang#98783 (interpret: make a comment less scary) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…i-obk add more `rustc_pass_by_value` r? `@oli-obk` cc rust-lang#98766
…i-obk add more `rustc_pass_by_value` r? ``@oli-obk`` cc rust-lang#98766
…i-obk add more `rustc_pass_by_value` r? ```@oli-obk``` cc rust-lang#98766
by changing
& $($mutability)?
to$(& $mutability)?
I also did some formatting changes because I started doing them for the visit methods I changed and then couldn't get myself to stop xx, I hope that's still fairly easy to review.