Skip to content

Commit 0aee831

Browse files
committed
fix(test): register pdu_test_skip_fs_errors in check-cfg
The #[allow(unexpected_cfgs)] approach doesn't override -D warnings used in CI release builds. Register the custom cfg in Cargo.toml's [lints.rust] section instead, which properly declares it as a known cfg to the compiler. https://claude.ai/code/session_01Ki7wbrgQXWs2GXf8h2hybQ
1 parent 127b958 commit 0aee831

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ terminal_size = "0.4.3"
7676
text-block-macros = "0.2.0"
7777
zero-copy-pads = "0.2.0"
7878

79+
[lints.rust]
80+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(pdu_test_skip_fs_errors)'] }
81+
7982
[dev-dependencies]
8083
build-fs-tree = "0.8.1"
8184
command-extra = "1.0.0"

tests/cli_errors.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ fn max_depth_0() {
106106
}
107107

108108
#[cfg(unix)]
109-
#[allow(unexpected_cfgs)]
110109
#[cfg(not(pdu_test_skip_fs_errors))]
111110
#[test]
112111
fn fs_errors() {

0 commit comments

Comments
 (0)