Skip to content

Commit fd5fe68

Browse files
committed
rust: globally deny rust_2018_idioms
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 01d62e8 commit fd5fe68

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ KBUILD_RUSTCFLAGS := --emit=dep-info,obj,metadata --edition=2018 \
527527
-Cpanic=abort -Cembed-bitcode=n -Clto=n -Crpath=n \
528528
-Cforce-unwind-tables=n -Ccodegen-units=1 \
529529
-Zbinary_dep_depinfo=y -Zsymbol-mangling-version=v0 \
530-
-Dunsafe_op_in_unsafe_fn -Wmissing_docs
530+
-Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \
531+
-Wmissing_docs
531532
KBUILD_CLIPPYFLAGS := -Dclippy::correctness -Dclippy::style \
532533
-Dclippy::complexity -Dclippy::perf
533534
KBUILD_AFLAGS_KERNEL :=

drivers/android/rust_binder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
#![no_std]
88
#![feature(global_asm, try_reserve, allocator_api, concat_idents)]
9+
#![allow(rust_2018_idioms)]
910

1011
use alloc::{boxed::Box, sync::Arc};
1112
use core::pin::Pin;

rust/compiler_builtins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ extern "C" {
141141
}
142142

143143
#[panic_handler]
144-
fn panic(_info: &core::panic::PanicInfo) -> ! {
144+
fn panic(_info: &core::panic::PanicInfo<'_>) -> ! {
145145
unsafe {
146146
rust_helper_BUG();
147147
}

rust/kernel/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
receiver_trait,
2525
try_reserve
2626
)]
27-
#![deny(rust_2018_idioms)]
2827

2928
// Ensure conditional compilation based on the kernel configuration works;
3029
// otherwise we may silently break things like initcall handling.

0 commit comments

Comments
 (0)