-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Release build fails in assert_eq_size! with Rust nightly ≥ 2023-06-09 #5263
Comments
\cc @MichaReiser |
Thanks for reporting this new issue. According to rust-lang/compiler-team#608, the main reason of the change is to avoid collisions between two type ids.
I recommend that we simply hash the
We can further mitigate this issue by manually implement
We aren't using an Edit: Another alternative is to use string labels. String labels have the downside that collisions are even more likely (because someone accidentally re-uses an existing name) and comparing strings is more expensive than comparing numbers. The safest (and least clever?) may be to introduce a new trait that defines two methods:
|
This is because Rust inflated
TypeId
from 64 bits to 128 bits (rust-lang/rust#109953).The affected
format_element::tag::LabelId
struct is currently never constructed and itsid: TypeId
field is never used. I don’t know what you plan to use this for, but does it need the extensibility ofTypeId
, or would a simpleenum
suffice?The text was updated successfully, but these errors were encountered: