• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --impl-partialeq --rust-target 1.40
2 /**
3  * We emit a `[u8; 63usize]` padding field for this struct, which cannot derive
4  * Debug/Hash because 63 is over the hard coded limit.
5  */
6 struct NoDebug {
7     char c;
8     // padding of 63 bytes
9 } __attribute__((__aligned__(64)));
10 
11 /**
12  * This should derive Debug/Hash/PartialEq/Eq because the padding size is less than the max derive
13  * Debug/Hash/PartialEq/Eq impl for arrays. However, we conservatively don't derive Debug/Hash because
14  * we determine Debug derive-ability before we compute padding, which happens at
15  * codegen.
16  */
17 struct ShouldDeriveDebugButDoesNot {
18     char c[32];
19     char d;
20     // padding of 31 bytes
21 } __attribute__((__aligned__(64)));
22