From ea270ca7baa75a4d6364c79e255549a2e4dd121a Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Mon, 2 May 2022 17:47:53 -0700 Subject: [PATCH] Silence warnings for example/test dependencies --- examples/WORKSPACE.bazel | 7 +++++++ test/deps.bzl | 7 +++++++ 2 files changed, 14 insertions(+) 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"], ) """