We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55f602f commit d257159Copy full SHA for d257159
core/tests/mem.rs
@@ -773,15 +773,20 @@ fn offset_of_addr() {
773
#[test]
774
fn const_maybe_uninit_zeroed() {
775
// Sanity check for `MaybeUninit::zeroed` in a realistic const situation (plugin array term)
776
+
777
+ // It is crucial that this type has no padding!
778
#[repr(C)]
779
struct Foo {
- a: Option<&'static str>,
780
+ a: Option<&'static u8>,
781
b: Bar,
782
c: f32,
783
+ _pad: u32,
784
d: *const u8,
785
}
786
787
788
struct Bar(usize);
789
790
struct FooPtr(*const Foo);
791
unsafe impl Sync for FooPtr {}
792
0 commit comments