pdl: Re-enable rustc errors for generated code
The generated code has rustc warnings: lots of warnings about wrong
camel-cased types, warnings about too many parenthesis, etc. We can
probably not fix all warnings, so we should suppress them.
Before, we suppressed the warnings by configuring Soong
lints: "none",
which makes it pass something like "-A warnings -A deny“ to rustc.
This has the bad side effect of disabling all lints, not just
warnings. In particular, it disabled the overflowing_literals lint,
which is a deny-by-default lint which we very much want to keep
enabled.
To fix this, we now emit the desired lint settings in the generated
code. This makes it easier for people who use pdl: they can simply
compile the code like any other piece of Rust code.
Test: atest pdl_rust_generator_tests_{le,be} pdl_tests
(cherry picked from https://android-review.googlesource.com/q/commit:61dc8dc9f75740904489a0929b604f64175f4bc4)
Merged-In: I29e32a1350fea04e88cbd595e6ea7663c8d70679
Change-Id: I29e32a1350fea04e88cbd595e6ea7663c8d70679
Loading
Please register or sign in to comment