aboutsummaryrefslogtreecommitdiffstats
path: root/rust/macros/paste.rs
diff options
context:
space:
mode:
authorMiguel Ojeda <[email protected]>2025-05-02 14:02:35 +0000
committerMiguel Ojeda <[email protected]>2025-05-06 22:11:47 +0000
commit7129ea6e242b00938532537da41ddf5fa3e21471 (patch)
treefa5673fa167e1f39b72b225cedd71520b3c12aaa /rust/macros/paste.rs
parentrust: allow Rust 1.87.0's `clippy::ptr_eq` lint (diff)
downloadkernel-7129ea6e242b00938532537da41ddf5fa3e21471.tar.gz
kernel-7129ea6e242b00938532537da41ddf5fa3e21471.zip
rust: clean Rust 1.88.0's `unnecessary_transmutes` lint
Starting with Rust 1.88.0 (expected 2025-06-26) [1][2], `rustc` may introduce a new lint that catches unnecessary transmutes, e.g.: error: unnecessary transmute --> rust/uapi/uapi_generated.rs:23242:18 | 23242 | unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `(self._bitfield_1.get(0usize, 1u8) as u8 == 1)` | = note: `-D unnecessary-transmutes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unnecessary_transmutes)]` There are a lot of them (at least 300), but luckily they are all in `bindgen`-generated code. Thus clean all up by allowing it there. Since unknown lints trigger a lint itself in older compilers, do it conditionally so that we can keep the `unknown_lints` lint enabled. Cc: [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust/pull/136083 [1] Link: https://github.com/rust-lang/rust/issues/136067 [2] Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros/paste.rs')
0 files changed, 0 insertions, 0 deletions