1
Fork 0
This commit is contained in:
Ralf Jung 2022-10-07 14:57:41 +02:00
parent 6f6433428f
commit d71a85135b
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
fn main() {
// Try many times as this might work by chance.
for _ in 0..10 {
for _ in 0..20 {
let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error.
let x = &x[0] as *const _ as *const u32;
// This must fail because alignment is violated: the allocation's base is not sufficiently aligned.

View file

@ -4,7 +4,7 @@ use std::ptr;
fn main() {
// Try many times as this might work by chance.
for _ in 0..10 {
for _ in 0..20 {
let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error.
let x = &x[0] as *const _ as *const u32;
// This must fail because alignment is violated: the allocation's base is not sufficiently aligned.