-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add regression tests for #23649 #26383
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I would prefer a test that the generated code is correct, e.g. use std::mem;
pub struct X([u8]);
fn _f(x: &X) -> usize { match *x { X(ref x) => { x.len() } } }
fn main() {
let b: &[u8] = &[11; 42];
let v: &X = unsafe { mem::transmute(b) };
assert_eq!(_f(v), 42);
} Also, use |
@arielb1 what do you mean by this? |
@arielb1 I'm just creating a regression test. The code that I have committed is the exact code that previous caused an ICE. Altering it could result in a no longer accurate regression test. |
0b6df8a
to
68bb164
Compare
Done I altered |
Closes #23649