Prevents running of clippy on bindgen targets (#1320)
diff --git a/bindgen/bindgen.bzl b/bindgen/bindgen.bzl
index a0e93d5..28d1764 100644
--- a/bindgen/bindgen.bzl
+++ b/bindgen/bindgen.bzl
@@ -77,7 +77,7 @@
rust_library(
name = name,
srcs = [name + "__bindgen.rs"],
- tags = tags + ["__bindgen"],
+ tags = tags + ["__bindgen", "noclippy"],
deps = deps + [cc_lib],
**kwargs
)
diff --git a/rust/private/clippy.bzl b/rust/private/clippy.bzl
index 29074f4..72cc757 100644
--- a/rust/private/clippy.bzl
+++ b/rust/private/clippy.bzl
@@ -145,14 +145,6 @@
if clippy_flags:
args.rustc_flags.extend(clippy_flags)
-
- elif "__bindgen" in ctx.rule.attr.tags:
- # bindgen-generated content is likely to trigger warnings, so
- # only fail on clippy warnings
- args.rustc_flags.add("-Dclippy::style")
- args.rustc_flags.add("-Dclippy::correctness")
- args.rustc_flags.add("-Dclippy::complexity")
- args.rustc_flags.add("-Dclippy::perf")
else:
# The user didn't provide any clippy flags explicitly so we apply conservative defaults.