Skip to content

Commit

Permalink
rust: globally deny rust_2018_idioms
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Jul 2, 2021
1 parent 9b15640 commit b548e03
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,8 @@ KBUILD_RUSTCFLAGS := --emit=dep-info,obj,metadata --edition=2018 \
-Cpanic=abort -Cembed-bitcode=n -Clto=n -Crpath=n \
-Cforce-unwind-tables=n -Ccodegen-units=1 \
-Zbinary_dep_depinfo=y -Zsymbol-mangling-version=v0 \
-Dunsafe_op_in_unsafe_fn -Wmissing_docs
-Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \
-Wmissing_docs
KBUILD_CLIPPYFLAGS := -Dclippy::correctness -Dclippy::style \
-Dclippy::complexity -Dclippy::perf
KBUILD_AFLAGS_KERNEL :=
Expand Down
2 changes: 2 additions & 0 deletions drivers/android/rust_binder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#![no_std]
#![feature(global_asm, try_reserve, allocator_api, concat_idents)]
// TODO: clean these up
#![allow(rust_2018_idioms)]

use alloc::{boxed::Box, sync::Arc};
use core::pin::Pin;
Expand Down
2 changes: 1 addition & 1 deletion rust/compiler_builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ extern "C" {
}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
fn panic(_info: &core::panic::PanicInfo<'_>) -> ! {
unsafe {
rust_helper_BUG();
}
Expand Down
1 change: 0 additions & 1 deletion rust/kernel/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
receiver_trait,
try_reserve
)]
#![deny(rust_2018_idioms)]

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

0 comments on commit b548e03

Please sign in to comment.