-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Trim discriminants to their final type size #49403
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
Conversation
@bors r+ |
📌 Commit 6b3202a has been approved by |
@bors r-
|
src/librustc_mir/hair/pattern/mod.rs
Outdated
ty::layout::Variants::NicheFilling { dataful_variant, .. } => | ||
dataful_variant, | ||
ty::layout::Variants::NicheFilling { .. } => { | ||
assert_eq!(discr_val as usize as u128, discr_val); |
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.
ping @eddyb works now
@bors r=eddyb |
📌 Commit 422efd7 has been approved by |
@@ -851,13 +851,38 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> { | |||
ty::TyAdt(adt_def, substs) if adt_def.is_enum() => { | |||
match cv.val { | |||
ConstVal::Value(val) => { | |||
let discr = const_discr( | |||
let discr_val = const_discr( |
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.
Didn't we discuss that what const_discr
calls is wrong, and the Tagged
handling below should be fixed in there too?
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.
Ugh the PR just got merged >_<
☀️ Test successful - status-appveyor, status-travis |
Removing "beta-nominated" tag since we didn't have a beta yet. |
r? @eddyb
fixes #49181