Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2d01258

Browse files
author
The Miri Conjob Bot
committed
fmt
1 parent 743be66 commit 2d01258

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/tools/miri/tests/pass/align_repeat_into_packed_field.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
use std::intrinsics::mir::*;
33

44
#[repr(packed)]
5-
struct S { field: [u32; 2] }
5+
struct S {
6+
field: [u32; 2],
7+
}
68

79
#[custom_mir(dialect = "runtime", phase = "optimized")]
8-
fn test() { mir! {
9-
let s: S;
10-
{
11-
// Store a repeat expression directly into a field of a packed struct.
12-
s.field = [0; 2];
13-
Return()
10+
fn test() {
11+
mir! {
12+
let s: S;
13+
{
14+
// Store a repeat expression directly into a field of a packed struct.
15+
s.field = [0; 2];
16+
Return()
17+
}
1418
}
15-
} }
19+
}
1620

1721
fn main() {
1822
// Run this a bunch of time to make sure it doesn't pass by chance.

0 commit comments

Comments
 (0)