mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Suppress remaining warnings in third party rust crates
This commit is contained in:
parent
c7a4ca3c88
commit
836fc255ba
2 changed files with 21 additions and 1 deletions
|
@ -14,6 +14,7 @@ registry_github = "$crates/registry/src/github.com-1ecc6299db9ec823/"
|
|||
rust_crate("libc") {
|
||||
source_root = "$registry_github/libc-0.2.42/src/lib.rs"
|
||||
features = [ "use_std" ]
|
||||
args = [ "-Aunused_macros" ] # Unused macro `f` in macros.rs:51.
|
||||
}
|
||||
|
||||
rust_crate("url") {
|
||||
|
@ -163,6 +164,18 @@ rust_crate("winapi-0.2") {
|
|||
crate_name = "winapi"
|
||||
crate_version = "0.2"
|
||||
source_root = "$registry_github/winapi-0.2.8/src/lib.rs"
|
||||
args = [
|
||||
"-Asafe_packed_borrows",
|
||||
"-Awarnings",
|
||||
]
|
||||
|
||||
# The winapi-0.2 crate contains an unused type alias, but it also specifically
|
||||
# sets the lint level to warn about this, so we can't suppress that warning
|
||||
# with a command line argument, other than by using "-Awarnings", which has no
|
||||
# effect if we also pass "-Dwarnings" to treat all warnings as errors.
|
||||
# Since this crate is outdated and this will never be fixed, just override
|
||||
# the global 'rust_treat_warnings_as_errors' setting for this crate.
|
||||
treat_warnings_as_errors = false
|
||||
}
|
||||
|
||||
# TODO: Remove this crate together with crate 'winapi-0.2'.
|
||||
|
@ -242,6 +255,7 @@ rust_crate("miow") {
|
|||
crate_version = "0.2"
|
||||
},
|
||||
]
|
||||
args = [ "-Aunused_macros" ] # Unused macro `t` in lib.rs:21.
|
||||
}
|
||||
|
||||
rust_crate("iovec") {
|
||||
|
|
|
@ -57,6 +57,7 @@ template("run_rustc") {
|
|||
"is_test",
|
||||
"source_root",
|
||||
"testonly",
|
||||
"treat_warnings_as_errors",
|
||||
])
|
||||
if (!defined(crate_name)) {
|
||||
crate_name = target_name
|
||||
|
@ -64,6 +65,10 @@ template("run_rustc") {
|
|||
if (!defined(is_test)) {
|
||||
is_test = false
|
||||
}
|
||||
if (!defined(treat_warnings_as_errors)) {
|
||||
# Use global setting if not explicitly specified for this target.
|
||||
treat_warnings_as_errors = rust_treat_warnings_as_errors
|
||||
}
|
||||
|
||||
sources = [
|
||||
source_root,
|
||||
|
@ -76,7 +81,7 @@ template("run_rustc") {
|
|||
"--crate-type=$crate_type",
|
||||
]
|
||||
|
||||
if (rust_treat_warnings_as_errors) {
|
||||
if (treat_warnings_as_errors) {
|
||||
args += [ "-Dwarnings" ]
|
||||
}
|
||||
|
||||
|
@ -254,6 +259,7 @@ template("rust_crate") {
|
|||
"is_test",
|
||||
"source_root",
|
||||
"testonly",
|
||||
"treat_warnings_as_errors",
|
||||
])
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue