Require safety comments for unsafe blocks.

Also require unsafe blocks even within unsafe functions.

Bug: 290018030
Test: m pvmfw_bin
Change-Id: I6ffce7b59a9b2f22572a88e0ba55aaf01576273c
This commit is contained in:
Andrew Walbran 2023-07-06 17:29:23 +01:00
parent a9778d576b
commit 7d61fae91d

View file

@ -46,6 +46,7 @@ var (
"-A deprecated", "-A deprecated",
"-D missing-docs", "-D missing-docs",
"-D warnings", "-D warnings",
"-D unsafe_op_in_unsafe_fn",
} }
// Default Clippy lints. These are applied on top of defaultRustcLints. // Default Clippy lints. These are applied on top of defaultRustcLints.
// It should be assumed that any warning lint will be promoted to a // It should be assumed that any warning lint will be promoted to a
@ -55,6 +56,7 @@ var (
"-A clippy::unnecessary-wraps", "-A clippy::unnecessary-wraps",
"-A clippy::unusual-byte-groupings", "-A clippy::unusual-byte-groupings",
"-A clippy::upper-case-acronyms", "-A clippy::upper-case-acronyms",
"-D clippy::undocumented_unsafe_blocks",
} }
// Rust lints for vendor code. // Rust lints for vendor code.