Skip to content

Commit 538f4fa

Browse files
committed
Add FreeBSD as a target OS for TestDir to avoid warnings
Currently, running rust-analyzer tests on FreeBSD produces an "unused variable" warning. The code is fully compatible with FreeBSD and doesn't have to be omitted. Signed-off-by: Vladimir Krivopalov <[email protected]>
1 parent 7c387ed commit 538f4fa

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)