We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30e17e3 commit d17156aCopy full SHA for d17156a
crates/hir-ty/src/layout/tests.rs
@@ -220,6 +220,36 @@ fn recursive() {
220
);
221
}
222
223
+#[test]
224
+fn repr_packed() {
225
+ size_and_align! {
226
+ #[repr(packed)]
227
+ struct Goal;
228
+ }
229
230
+ #[repr(packed(2))]
231
232
233
234
+ #[repr(packed(4))]
235
236
237
238
239
+ struct Goal(i32);
240
241
242
243
244
245
246
247
248
249
+
250
+ check_size_and_align("#[repr(packed(5))] struct Goal(i32);", "", 4, 1);
251
+}
252
253
#[test]
254
fn generic() {
255
size_and_align! {
0 commit comments