From: Miguel Ojeda Date: Sun, 5 Apr 2026 23:52:39 +0000 (+0200) Subject: rust: kbuild: remove unneeded old `allow`s for generated layout tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92cc022f044f8702f18ae432d205dbf31db58b42;p=thirdparty%2Fkernel%2Flinux.git rust: kbuild: remove unneeded old `allow`s for generated layout tests The issue that required `allow`s for `cfg(test)` code generated by `bindgen` for layout testing was fixed back in `bindgen` 0.60.0 [1], so it could have been removed even before the version bump, but it does not hurt. Thus remove it now. Link: https://github.com/rust-lang/rust-bindgen/pull/2203 [1] Reviewed-by: Tamir Duberstein Reviewed-by: Gary Guo Link: https://patch.msgid.link/20260405235309.418950-4-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- diff --git a/rust/bindings/lib.rs b/rust/bindings/lib.rs index 19f57c5b2fa2a..e18c160dad172 100644 --- a/rust/bindings/lib.rs +++ b/rust/bindings/lib.rs @@ -9,10 +9,6 @@ //! using this crate. #![no_std] -// See . -#![cfg_attr(test, allow(deref_nullptr))] -#![cfg_attr(test, allow(unaligned_references))] -#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))] #![allow( clippy::all, missing_docs, diff --git a/rust/uapi/lib.rs b/rust/uapi/lib.rs index 1d5fd9efb93e9..821e286e0daa3 100644 --- a/rust/uapi/lib.rs +++ b/rust/uapi/lib.rs @@ -8,10 +8,6 @@ //! userspace APIs. #![no_std] -// See . -#![cfg_attr(test, allow(deref_nullptr))] -#![cfg_attr(test, allow(unaligned_references))] -#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))] #![allow( clippy::all, clippy::cast_lossless,