prost
prost copied to clipboard
impl block attributes? (to avoid clippy warnings)
trafficstars
Big picture: trying to disable clippy warnings for generated impl blocks
This seems to prevent clippy warnings on each generated enum & struct:
config.type_attribute(".", "#[allow(clippy::all)]");
but related impl blocks still cause clippy warnings.
is there already a solution for this?
Failed attempt #1
#[allow(clippy::all)] // <-- still produces warnings
pub mod com {
pub mod foo {
pub mod bar {
#[allow(clippy::all)] // <-- also still produces warnings
include!(concat!(env!("OUT_DIR"), "/com.foo.bar.rs"));
}
}
}
clippy::all is not literally "all" lints, rather it's the lints enabled by default. If you have additional lints enabled, you want to #[allow] those as well, or simply slap a #[allow(warnings)] on it.