-
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
unit rvalue, use constant ()
instead of tuple
#70891
Conversation
28a879a
to
f0801f7
Compare
LGTM, but let's wait for #70721 first (since |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
f0801f7
to
6a9ffda
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
#70721 landed, you need to rebase and run |
6a9ffda
to
aca4294
Compare
done, these new mir dumps are far longer than the previous ones though |
_0 = (); // bb0[160]: scope 0 at $DIR/address-of.rs:3:26: 37:2 | ||
_0 = const (); // bb0[160]: scope 0 at $DIR/address-of.rs:3:26: 37:2 | ||
// ty::Const | ||
// + ty: () | ||
// + val: Value(Scalar(<ZST>)) | ||
// mir::Constant | ||
// + span: $DIR/address-of.rs:3:26: 37:2 | ||
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } |
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.
@rust-lang/wg-mir-opt Should we prioritize removing these verbose comments? I'm not sure they add much value.
(There's the Span
but that only makes sense when it differs the statement Span
, which it doesn't here)
Blocking this on #70989, as we want to be able to tell on the PR itself that |
Rvalue::Use(Operand::Constant(box Constant { | ||
span: source_info.span, | ||
user_ty: None, | ||
literal: ty::Const::zero_sized(tcx, tcx.types.unit), |
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.
FWIW, I'm coincidentally adding tcx.consts.unit
to #70970.
☔ The latest upstream changes (presumably #70989) made this pull request unmergeable. Please resolve the merge conflicts. |
@lcnr If you rebase, I think CI should now show the 32-bit mismatches. |
aca4294
to
4714e20
Compare
done 🤷♂️ what now? I doubt that changing all tests to only run on 64bit is a good idea. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@lcnr You manually fix it based on errors on CI (hard) or you run the |
Ok, Ready to merge afaict. |
@bors r+ Thanks! |
📌 Commit 647f810 has been approved by |
unit rvalue, use constant `()` instead of tuple fixes rust-lang#70886 r? @eddyb
Rollup of 4 pull requests Successful merges: - rust-lang#70891 (unit rvalue, use constant `()` instead of tuple) - rust-lang#71030 (rustc_target: Refactor target specifications related to Windows and UEFI) - rust-lang#71100 (Miri: expand frame hooks) - rust-lang#71116 (Entirely remove `DUMMY_HIR_ID`) Failed merges: r? @ghost
fixes #70886
r? @eddyb