Skip to content

Commit 34658e6

Browse files
committed
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: #285 Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 40fb0c7 commit 34658e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ KBUILD_RUSTC_TARGET := $(srctree)/arch/$(SRCARCH)/rust/target.json
515515
KBUILD_RUSTCFLAGS := --emit=dep-info,obj,metadata --edition=2018 \
516516
-Cpanic=abort -Cembed-bitcode=n -Clto=n -Crpath=n \
517517
-Cforce-unwind-tables=n -Ccodegen-units=1 \
518-
-Zbinary_dep_depinfo=y -Zsymbol-mangling-version=v0
518+
-Zbinary_dep_depinfo=y -Zsymbol-mangling-version=v0 \
519+
-W unsafe_op_in_unsafe_fn
519520
KBUILD_AFLAGS_KERNEL :=
520521
KBUILD_CFLAGS_KERNEL :=
521522
KBUILD_RUSTCFLAGS_KERNEL :=

0 commit comments

Comments
 (0)