We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 743be66 commit 2d01258Copy full SHA for 2d01258
src/tools/miri/tests/pass/align_repeat_into_packed_field.rs
@@ -2,17 +2,21 @@
2
use std::intrinsics::mir::*;
3
4
#[repr(packed)]
5
-struct S { field: [u32; 2] }
+struct S {
6
+ field: [u32; 2],
7
+}
8
9
#[custom_mir(dialect = "runtime", phase = "optimized")]
-fn test() { mir! {
- let s: S;
10
- {
11
- // Store a repeat expression directly into a field of a packed struct.
12
- s.field = [0; 2];
13
- Return()
+fn test() {
+ mir! {
+ let s: S;
+ {
14
+ // Store a repeat expression directly into a field of a packed struct.
15
+ s.field = [0; 2];
16
+ Return()
17
+ }
18
}
-} }
19
20
21
fn main() {
22
// Run this a bunch of time to make sure it doesn't pass by chance.
0 commit comments