-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
miri: lift restriction on extern types being the only field in a struct #91910
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
fn main() { | ||
assert_eq!(A_REF.as_slice(), &[5, 6, 7]); | ||
// Check that interpreter and code generation agree about the position of the tail field. | ||
assert_eq!(A_TAIL_OFFSET, tail_offset(A_REF)); |
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.
Nice test. :)
I wonder if there are corner cases that make it more challenging, like newtype-wrapping Opaque
in a repr(align)
type to ensure it has alignment larger than usize
?
d26a329
to
7b65bb9
Compare
7b65bb9
to
fd47d24
Compare
Thanks! |
📌 Commit fd47d24 has been approved by |
miri: lift restriction on extern types being the only field in a struct Fixes rust-lang#91827. r? `@RalfJung`
miri: lift restriction on extern types being the only field in a struct Fixes rust-lang#91827. r? ``@RalfJung``
miri: lift restriction on extern types being the only field in a struct Fixes rust-lang#91827. r? ```@RalfJung```
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#87901 (Fix suggestion of additional `pub` when using `pub pub fn ...`) - rust-lang#89090 (Lint bare traits in AstConv.) - rust-lang#91818 (Show the unused type for `unused_results` lint) - rust-lang#91910 (miri: lift restriction on extern types being the only field in a struct) - rust-lang#91928 (Constify (most) `Option` methods) - rust-lang#91975 (Move generator check earlier in inlining.) - rust-lang#92016 (builtin_macros: allow external consumers for AsmArgs parsing) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #91827.
r? @RalfJung