Skip to content

Commit a995319

Browse files
Merge pull request #19055 from vkrivopalov/fix-testdir-unused-variable-warning-on-freebsd
Add FreeBSD as a target OS for TestDir to avoid warnings
2 parents 7c387ed + 538f4fa commit a995319

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: crates/rust-analyzer/tests/slow-tests/testdir.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@ impl TestDir {
4343
}
4444
fs::create_dir_all(&path).unwrap();
4545

46-
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
46+
#[cfg(any(
47+
target_os = "macos",
48+
target_os = "linux",
49+
target_os = "windows",
50+
target_os = "freebsd"
51+
))]
4752
if symlink {
4853
let symlink_path = base.join(format!("{pid}_{cnt}_symlink"));
49-
#[cfg(any(target_os = "macos", target_os = "linux"))]
54+
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "freebsd"))]
5055
std::os::unix::fs::symlink(path, &symlink_path).unwrap();
5156

5257
#[cfg(target_os = "windows")]

0 commit comments

Comments
 (0)