mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-07 12:01:21 +00:00
In the upcoming Rust 1.78.0, Clippy suggests to implement `Default` even
when `new()` is `const`, since `Default::default()` may call `const`
functions even if it is not `const` itself [1]:
error: you should consider adding a `Default` implementation for `LockClassKey`
--> rust/kernel/sync.rs:31:5
|
31 | / pub const fn new() -> Self {
32 | | Self(Opaque::uninit())
33 | | }
| |_____^
Thus implement it.
Link: https://github.com/rust-lang/rust-clippy/pull/10903 [1]
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240401212303.537355-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
|
||
|---|---|---|
| .. | ||
| alloc | ||
| init | ||
| net | ||
| sync | ||
| alloc.rs | ||
| build_assert.rs | ||
| error.rs | ||
| init.rs | ||
| ioctl.rs | ||
| kunit.rs | ||
| lib.rs | ||
| net.rs | ||
| prelude.rs | ||
| print.rs | ||
| static_assert.rs | ||
| std_vendor.rs | ||
| str.rs | ||
| sync.rs | ||
| task.rs | ||
| time.rs | ||
| types.rs | ||
| workqueue.rs | ||