From 5e433304fac6864d2ef75b3124281d18cd5a35ba Mon Sep 17 00:00:00 2001 From: John Baublitz Date: Thu, 17 Jun 2021 17:05:47 -0400 Subject: [PATCH 1/2] Allow code generated by bindgen for testing struct layouts --- src/systemd/bindings.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/systemd/bindings.rs b/src/systemd/bindings.rs index fda3e74255..d0e81a5cbe 100644 --- a/src/systemd/bindings.rs +++ b/src/systemd/bindings.rs @@ -5,5 +5,9 @@ #![allow(clippy::redundant_static_lifetimes)] #![allow(clippy::unreadable_literal)] #![allow(clippy::missing_safety_doc)] +// This allow should be removed once bindgen finds a way to +// generate struct alignment tests without triggering errors +// in the compiler. See https://github.com/rust-lang/rust-bindgen/issues/1651. +#![allow(deref_nullptr)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); From 3aafc75c991548a468631c6aa6e6b20d60632de1 Mon Sep 17 00:00:00 2001 From: mulhern Date: Fri, 18 Jun 2021 20:53:48 -0400 Subject: [PATCH 2/2] Allow lint in order to cover our lowest supported toolchain This would be unnecessary if it were a clippy lint, but it is a regular compiler lint. Signed-off-by: mulhern --- src/systemd/bindings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemd/bindings.rs b/src/systemd/bindings.rs index d0e81a5cbe..9dd61cfc2c 100644 --- a/src/systemd/bindings.rs +++ b/src/systemd/bindings.rs @@ -8,6 +8,7 @@ // This allow should be removed once bindgen finds a way to // generate struct alignment tests without triggering errors // in the compiler. See https://github.com/rust-lang/rust-bindgen/issues/1651. +#![allow(unknown_lints)] #![allow(deref_nullptr)] include!(concat!(env!("OUT_DIR"), "/bindings.rs"));