-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compute the layout of uninhabited structs #64987
Conversation
assert!(field < count as u64, | ||
"Tried to access field {} of union with {} fields", field, count); | ||
"Tried to access field {} of union {:#?} with {} fields", | ||
field, base.layout, count); |
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 you add this assert to FieldPlacement::offset
? And even add an offset_u64
, if you want (I guess offset(i)
can just call offset_u64(i as u64)
? or maybe we just want an i: impl Into<u64>
on offset
).
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.
u64
does not implement From<usize>
:(
@bors r+ |
📌 Commit 373c362 has been approved by |
⌛ Testing commit 373c362 with merge 2fe9b4b0bf4f8842e26f58d928cf6a5d5153fbfa... |
…=eddyb Compute the layout of uninhabited structs fixes rust-lang#64506 r? @eddyb
@bors retry rolled up. |
⌛ Testing commit 373c362 with merge 434fcab8166c6478551efb023d412fa6e67b0731... |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. 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 |
💔 Test failed - checks-azure |
@bors retry |
@Centril I assume you noticed, but just in case, FYI every single build appears to be failing on a connection error to the azure ubuntu apt repos. |
@bors treeclosed=1000 |
@bors treeclose=1000 network problems |
@bors treeclosed- This build seems to be ok. |
☀️ Test successful - checks-azure |
fixes #64506
r? @eddyb