Files
linux/rust/kernel
Miguel Ojeda 0f5878834d rust: bitmap: clean Rust 1.92.0 unused_unsafe warning
Starting with Rust 1.92.0 (expected 2025-12-11), Rust allows to safely
take the address of a union field [1][2]:

      CLIPPY L rust/kernel.o
    error: unnecessary `unsafe` block
       --> rust/kernel/bitmap.rs:169:13
        |
    169 |             unsafe { core::ptr::addr_of!(self.repr.bitmap) }
        |             ^^^^^^ unnecessary `unsafe` block
        |
        = note: `-D unused-unsafe` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(unused_unsafe)]`

    error: unnecessary `unsafe` block
       --> rust/kernel/bitmap.rs:185:13
        |
    185 |             unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
        |             ^^^^^^ unnecessary `unsafe` block

Thus allow both instances to clean the warning in newer compilers.

Link: https://github.com/rust-lang/rust/issues/141264 [1]
Link: https://github.com/rust-lang/rust/pull/141469 [2]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
2025-10-15 10:39:54 -04:00
..
2025-08-21 21:09:48 +02:00
2025-07-23 02:05:58 +02:00
2025-07-23 02:05:58 +02:00
2025-10-07 12:31:46 +02:00
2025-08-13 17:40:28 +02:00
2025-07-21 01:16:35 +02:00
2025-09-06 13:27:20 +02:00
2025-08-21 21:09:48 +02:00
2025-07-21 01:16:35 +02:00
2025-08-21 16:58:07 +02:00
2025-09-22 23:55:41 +02:00
2025-09-15 09:38:35 +02:00
2024-11-04 16:21:44 -05:00