From 6c3825e537e15cc7633337e2dababb61b4cb1e97 Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Mon, 23 Dec 2024 15:20:33 +0000 Subject: [PATCH] Silence `private_bounds` lint in `KnownLayout` derive For reasons not-yet-known, the `private_bounds` lint flags the output of `derive(KnownLayout)` on `repr(C)` structs generated by macros. This is likely a rustc bug, but to preserve a good experience for our users, we nonetheless, `allow(private_bounds)`. Fixes #2177 --- zerocopy-derive/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zerocopy-derive/src/lib.rs b/zerocopy-derive/src/lib.rs index c7fac7d24e..068cead914 100644 --- a/zerocopy-derive/src/lib.rs +++ b/zerocopy-derive/src/lib.rs @@ -320,6 +320,9 @@ fn derive_known_layout_inner(ast: &DeriveInput, _top_level: Trait) -> Result ( #(::zerocopy::util::macro_util::core_reexport::mem::MaybeUninit< <#ident #ty_generics as