From 34658e6432106bb1c91e06665846abf807e4d5e8 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Thu, 3 Jun 2021 23:34:28 +0200 Subject: [PATCH] rust: globally warn on `unsafe_op_in_unsafe_fn` This includes non-`rust/` code. As soon as the warnings are cleaned up, we can move it to a hard error. Fixes: https://github.com/Rust-for-Linux/linux/issues/285 Signed-off-by: Miguel Ojeda --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c4bac4898e0a8..d79073b0f69f63 100644 --- a/Makefile +++ b/Makefile @@ -515,7 +515,8 @@ KBUILD_RUSTC_TARGET := $(srctree)/arch/$(SRCARCH)/rust/target.json 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 + -Zbinary_dep_depinfo=y -Zsymbol-mangling-version=v0 \ + -W unsafe_op_in_unsafe_fn KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := KBUILD_RUSTCFLAGS_KERNEL :=