Skip to content

Commit 666c6df

Browse files
authored
Merge pull request #10054 from cakebaker/cargo_toml_add_cygwin_to_unexpected_cfgs
clippy: allow "cygwin" as value for "target_os"
2 parents 655d786 + 2c5e00e commit 666c6df

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,12 @@ workspace = true
619619
# This is the linting configuration for all crates.
620620
# In order to use these, all crates have `[lints] workspace = true` section.
621621
[workspace.lints.rust]
622-
# Allow "fuzzing" as a "cfg" condition name
622+
# Allow "fuzzing" as a "cfg" condition name and "cygwin" as a value for "target_os"
623623
# https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html
624-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
624+
unexpected_cfgs = { level = "warn", check-cfg = [
625+
'cfg(fuzzing)',
626+
'cfg(target_os, values("cygwin"))',
627+
] }
625628
#unused_qualifications = "warn" // TODO: fix warnings in uucore, then re-enable this lint
626629

627630
[workspace.lints.clippy]

src/uu/stdbuf/src/libstdbuf/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ keywords.workspace = true
1010
categories.workspace = true
1111
edition.workspace = true
1212

13+
[lints]
14+
workspace = true
15+
1316
[lib]
1417
name = "stdbuf"
1518
path = "src/libstdbuf.rs"

0 commit comments

Comments
 (0)