Skip to content

Commit 4a514f4

Browse files
committed
Address unexpected_cfgs warning
See: - #1110 - #1111
1 parent 91edb88 commit 4a514f4

File tree

9 files changed

+31
-0
lines changed

9 files changed

+31
-0
lines changed

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ crossbeam-utils = { version = "0.8.18", path = "crossbeam-utils", default-featur
5050
[dev-dependencies]
5151
rand = "0.8"
5252

53+
[lints]
54+
workspace = true
55+
5356
[workspace]
5457
resolver = "2"
5558
members = [
@@ -62,3 +65,9 @@ members = [
6265
"crossbeam-skiplist",
6366
"crossbeam-utils",
6467
]
68+
69+
[workspace.lints.rust]
70+
unexpected_cfgs = { level = "warn", check-cfg = [
71+
'cfg(crossbeam_loom)',
72+
'cfg(crossbeam_sanitize)',
73+
] }

crossbeam-channel/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
3030
num_cpus = "1.13.0"
3131
rand = "0.8"
3232
signal-hook = "0.3"
33+
34+
[lints]
35+
workspace = true

crossbeam-channel/benchmarks/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ doc = false
7575
name = "mpmc"
7676
path = "mpmc.rs"
7777
doc = false
78+
79+
[lints]
80+
workspace = true

crossbeam-deque/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
2929

3030
[dev-dependencies]
3131
rand = "0.8"
32+
33+
[lints]
34+
workspace = true

crossbeam-epoch/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ loom-crate = { package = "loom", version = "0.7.1", optional = true }
5454

5555
[dev-dependencies]
5656
rand = "0.8"
57+
58+
[lints]
59+
workspace = true

crossbeam-queue/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
4141

4242
[dev-dependencies]
4343
rand = "0.8"
44+
45+
[lints]
46+
workspace = true

crossbeam-skiplist/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
3333

3434
[dev-dependencies]
3535
rand = "0.8"
36+
37+
[lints]
38+
workspace = true

crossbeam-utils/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ loom = { version = "0.7.1", optional = true }
4141

4242
[dev-dependencies]
4343
rand = "0.8"
44+
45+
[lints]
46+
workspace = true

crossbeam-utils/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include!("build-common.rs");
1919

2020
fn main() {
2121
println!("cargo:rerun-if-changed=no_atomic.rs");
22+
println!("cargo:rustc-check-cfg=cfg(crossbeam_no_atomic,crossbeam_sanitize_thread)");
2223

2324
let target = match env::var("TARGET") {
2425
Ok(target) => convert_custom_linux_target(target),

0 commit comments

Comments
 (0)