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 8ff11dc commit d5e6436Copy full SHA for d5e6436
test_suite/tests/test_macros.rs
@@ -1878,3 +1878,19 @@ fn test_internally_tagged_newtype_variant_containing_unit_struct() {
1878
],
1879
);
1880
}
1881
+
1882
+#[deny(safe_packed_borrows)]
1883
+#[test]
1884
+fn test_packed_struct_can_derive_serialize() {
1885
+ #[derive(Copy, Clone, Serialize)]
1886
+ #[repr(packed, C)]
1887
+ struct PackedC {
1888
+ t: f32,
1889
+ }
1890
1891
1892
+ #[repr(C, packed)]
1893
+ struct CPacked {
1894
1895
1896
+}
0 commit comments