diff --git a/crates/globwalk/src/lib.rs b/crates/globwalk/src/lib.rs index 771cd52eba2aad..9400fbf65cde6f 100644 --- a/crates/globwalk/src/lib.rs +++ b/crates/globwalk/src/lib.rs @@ -415,7 +415,8 @@ mod test { std::fs::File::create(tmp.path().join(file)).unwrap(); } - if cfg!(unix) { + #[cfg(unix)] + { // these files/symlinks won't work on Windows std::fs::File::create(tmp.path().join("-")).unwrap(); std::fs::File::create(tmp.path().join("]")).unwrap();