Commit 8134d9e
authored
* Suppress `private_bounds` lint in `KnownLayout` derive
This commit suppresses the `private_bounds` lint on the `__ZerocopyKnownLayoutMaybeUninit` struct generated by `#[derive(KnownLayout)]`. This lint can be falsely triggered when the derive macro is used on a public struct within a `macro_rules!` macro, where the generated code refers to private types (field indices) that are technically "more private" than the public struct, even though they are in the same module scope.
Fixes #2177.
* Suppress `private_bounds` lint in `KnownLayout` derive
This commit suppresses the `private_bounds` lint on the `__ZerocopyKnownLayoutMaybeUninit` struct generated by `#[derive(KnownLayout)]`. This lint can be falsely triggered when the derive macro is used on a public struct within a `macro_rules!` macro, where the generated code refers to private types (field indices) that are technically "more private" than the public struct, even though they are in the same module scope.
Fixes #2177.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent e781936 commit 8134d9e
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments