diff --git a/examples/WORKSPACE.bazel b/examples/WORKSPACE.bazel index 953fb6dd0b..b2acd6955b 100644 --- a/examples/WORKSPACE.bazel +++ b/examples/WORKSPACE.bazel @@ -94,6 +94,13 @@ rust_library( name = "libc", srcs = glob(["src/**/*.rs"]), edition = "2015", + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ], visibility = ["//visibility:public"], ) """ diff --git a/test/deps.bzl b/test/deps.bzl index 58c09bc98a..96223dde04 100644 --- a/test/deps.bzl +++ b/test/deps.bzl @@ -11,6 +11,13 @@ rust_library( name = "libc", srcs = glob(["src/**/*.rs"]), edition = "2015", + rustc_flags = [ + # In most cases, warnings in 3rd party crates are not interesting as + # they're out of the control of consumers. The flag here silences + # warnings. For more details see: + # https://doc.rust-lang.org/rustc/lints/levels.html + "--cap-lints=allow", + ], visibility = ["//visibility:public"], ) """