Skip to content

Commit 64fadd5

Browse files
committed
rust: globally deny rust_2018_idioms
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 9b15640 commit 64fadd5

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Makefile

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

drivers/android/rust_binder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#![no_std]
88
#![feature(global_asm, try_reserve, allocator_api, concat_idents)]
99

10+
// TODO: cleanup
11+
#![allow(rust_2018_idioms)]
12+
1013
use alloc::{boxed::Box, sync::Arc};
1114
use core::pin::Pin;
1215
use kernel::{

rust/compiler_builtins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ extern "C" {
139139
}
140140

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

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)