Explicitly define Rust default lints

Add documentation on how lints are defined and used in Android. Merge
the deny_warnings attribute with a new attribute (no_lint) which can be
used to disable the default linting parameters.
Explicitly allow all lints for external/ and prebuilts/, which remove
any warning when building sysroot for the devices.

Test: cd external/rust/crates; mma
Test: add dummy internal Rust module; mma
Change-Id: I62be1c41aeda4068fb9e288038727c1de5ffe547
This commit is contained in:
Thiébaud Weksteen
2020-06-30 21:43:35 +02:00
parent cfc2df847c
commit 8e46efac71
6 changed files with 156 additions and 92 deletions

View File

@@ -46,7 +46,7 @@ var (
// Because clippy-driver uses rustc as backend, we need to have some output even during the linting.
// Use the metadata output as it has the smallest footprint.
"--emit metadata -o $out $in ${libFlags} " +
"$clippyFlags $rustcFlags",
"$rustcFlags $clippyFlags",
CommandDeps: []string{"$clippyCmd"},
},
"rustcFlags", "libFlags", "clippyFlags")