Skip to content

Commit 51a88c0

Browse files
authored
Add cargo unexpected cfg directive (#1106)
1 parent e8d9949 commit 51a88c0

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

Cargo.toml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ bitflags = { version = "2.4.0", default-features = false }
2020
itoa = { version = "1.0.1", default-features = false, optional = true }
2121

2222
# Special dependencies used in rustc-dep-of-std mode.
23-
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core"}
24-
rustc-std-workspace-alloc = { version = "1.0.0", optional = true} # not aliased here but in lib.rs casuse of name collision with the alloc feature
23+
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
24+
rustc-std-workspace-alloc = { version = "1.0.0", optional = true } # not aliased here but in lib.rs casuse of name collision with the alloc feature
2525
compiler_builtins = { version = '0.1.49', optional = true }
2626

2727
# The procfs feature needs once_cell.
@@ -249,3 +249,32 @@ cc = []
249249
# Enable `rustix::io::try_close`. The rustix developers do not intend the
250250
# existence of this feature to imply that anyone should use it.
251251
try_close = []
252+
253+
[lints.rust.unexpected_cfgs]
254+
level = "warn"
255+
check-cfg = [
256+
'cfg(alloc_c_string)',
257+
'cfg(alloc_ffi)',
258+
'cfg(apple)',
259+
'cfg(asm_experimental_arch)',
260+
'cfg(bsd)',
261+
'cfg(core_c_str)',
262+
'cfg(core_ffi_c)',
263+
'cfg(core_intrinsics)',
264+
'cfg(doc_cfg)',
265+
'cfg(document_experimental_runtime_api)',
266+
'cfg(fix_y2038)',
267+
'cfg(freebsdlike)',
268+
'cfg(libc)',
269+
'cfg(linux_kernel)',
270+
'cfg(linux_like)',
271+
'cfg(linux_raw)',
272+
'cfg(netbsdlike)',
273+
'cfg(rustc_attrs)',
274+
'cfg(solarish)',
275+
'cfg(staged_api)',
276+
'cfg(static_assertions)',
277+
'cfg(thumb_mode)',
278+
'cfg(wasi)',
279+
'cfg(wasi_ext)',
280+
]

0 commit comments

Comments
 (0)