Skip to content
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

Merged
merged 1 commit into from
Jul 2, 2022

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jul 1, 2022

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.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 1, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 1, 2022

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-highfive
Copy link
Collaborator

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 1, 2022
Copy link
Contributor

@oli-obk oli-obk left a 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,
Copy link
Contributor

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>,
Copy link
Contributor

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,
Copy link
Contributor

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?

@Dylan-DPC
Copy link
Member

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jul 1, 2022

📌 Commit cf9c0a5 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 2, 2022
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
@bors bors merged commit 05aebf8 into rust-lang:master Jul 2, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 2, 2022
@lcnr lcnr deleted the mir-visit-pass_by_value branch July 4, 2022 07:13
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 4, 2022
…i-obk

add more `rustc_pass_by_value`

r? `@oli-obk` cc rust-lang#98766
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jul 4, 2022
…i-obk

add more `rustc_pass_by_value`

r? ``@oli-obk`` cc rust-lang#98766
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 4, 2022
…i-obk

add more `rustc_pass_by_value`

r? ```@oli-obk``` cc rust-lang#98766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants