diff --git a/Cargo.toml b/Cargo.toml
index 63ef92bde..14f46133e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -50,6 +50,9 @@ crossbeam-utils = { version = "0.8.18", path = "crossbeam-utils", default-featur
 [dev-dependencies]
 rand = "0.8"
 
+[lints]
+workspace = true
+
 [workspace]
 resolver = "2"
 members = [
@@ -62,3 +65,9 @@ members = [
   "crossbeam-skiplist",
   "crossbeam-utils",
 ]
+
+[workspace.lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = [
+  'cfg(crossbeam_loom)',
+  'cfg(crossbeam_sanitize)',
+] }
diff --git a/crossbeam-channel/Cargo.toml b/crossbeam-channel/Cargo.toml
index e70b4dd97..5ead1e0b3 100644
--- a/crossbeam-channel/Cargo.toml
+++ b/crossbeam-channel/Cargo.toml
@@ -30,3 +30,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
 num_cpus = "1.13.0"
 rand = "0.8"
 signal-hook = "0.3"
+
+[lints]
+workspace = true
diff --git a/crossbeam-channel/benchmarks/Cargo.toml b/crossbeam-channel/benchmarks/Cargo.toml
index 751fdcedc..43b7d8426 100644
--- a/crossbeam-channel/benchmarks/Cargo.toml
+++ b/crossbeam-channel/benchmarks/Cargo.toml
@@ -75,3 +75,6 @@ doc = false
 name = "mpmc"
 path = "mpmc.rs"
 doc = false
+
+[lints]
+workspace = true
diff --git a/crossbeam-deque/Cargo.toml b/crossbeam-deque/Cargo.toml
index 187e6028f..37e5f784a 100644
--- a/crossbeam-deque/Cargo.toml
+++ b/crossbeam-deque/Cargo.toml
@@ -29,3 +29,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
 
 [dev-dependencies]
 rand = "0.8"
+
+[lints]
+workspace = true
diff --git a/crossbeam-epoch/Cargo.toml b/crossbeam-epoch/Cargo.toml
index 1cb0750d4..1900b4baf 100644
--- a/crossbeam-epoch/Cargo.toml
+++ b/crossbeam-epoch/Cargo.toml
@@ -54,3 +54,6 @@ loom-crate = { package = "loom", version = "0.7.1", optional = true }
 
 [dev-dependencies]
 rand = "0.8"
+
+[lints]
+workspace = true
diff --git a/crossbeam-queue/Cargo.toml b/crossbeam-queue/Cargo.toml
index 050c2c6d5..0cec3bdae 100644
--- a/crossbeam-queue/Cargo.toml
+++ b/crossbeam-queue/Cargo.toml
@@ -41,3 +41,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
 
 [dev-dependencies]
 rand = "0.8"
+
+[lints]
+workspace = true
diff --git a/crossbeam-skiplist/Cargo.toml b/crossbeam-skiplist/Cargo.toml
index 5f9bacd82..a5fdb3568 100644
--- a/crossbeam-skiplist/Cargo.toml
+++ b/crossbeam-skiplist/Cargo.toml
@@ -33,3 +33,6 @@ crossbeam-utils = { version = "0.8.18", path = "../crossbeam-utils", default-fea
 
 [dev-dependencies]
 rand = "0.8"
+
+[lints]
+workspace = true
diff --git a/crossbeam-utils/Cargo.toml b/crossbeam-utils/Cargo.toml
index ea87401b1..92f519bf8 100644
--- a/crossbeam-utils/Cargo.toml
+++ b/crossbeam-utils/Cargo.toml
@@ -41,3 +41,6 @@ loom = { version = "0.7.1", optional = true }
 
 [dev-dependencies]
 rand = "0.8"
+
+[lints]
+workspace = true
diff --git a/crossbeam-utils/build.rs b/crossbeam-utils/build.rs
index c71c23136..ff7e81f94 100644
--- a/crossbeam-utils/build.rs
+++ b/crossbeam-utils/build.rs
@@ -19,6 +19,7 @@ include!("build-common.rs");
 
 fn main() {
     println!("cargo:rerun-if-changed=no_atomic.rs");
+    println!("cargo:rustc-check-cfg=cfg(crossbeam_no_atomic,crossbeam_sanitize_thread)");
 
     let target = match env::var("TARGET") {
         Ok(target) => convert_custom_linux_target(target),