Skip to content

Commit 468c617

Browse files
committed
add a test
1 parent b85178a commit 468c617

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// check-pass
2+
// compile-flags: -Zextra-const-ub-checks
3+
4+
#[repr(packed)]
5+
pub struct Foo {
6+
bar: u8,
7+
baa: [u32; 1],
8+
}
9+
10+
const FOOMP: Foo = Foo {
11+
bar: 0,
12+
baa: [69; 1],
13+
};
14+
15+
fn main() {
16+
let _val = FOOMP;
17+
}

0 commit comments

Comments
 (0)