mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 18:26:19 +00:00
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 <vladimir@krivopalov.ru>
This commit is contained in:
parent
7c387ed3a7
commit
538f4faafb
1 changed files with 7 additions and 2 deletions
|
|
@ -43,10 +43,15 @@ impl TestDir {
|
|||
}
|
||||
fs::create_dir_all(&path).unwrap();
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
|
||||
#[cfg(any(
|
||||
target_os = "macos",
|
||||
target_os = "linux",
|
||||
target_os = "windows",
|
||||
target_os = "freebsd"
|
||||
))]
|
||||
if symlink {
|
||||
let symlink_path = base.join(format!("{pid}_{cnt}_symlink"));
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "freebsd"))]
|
||||
std::os::unix::fs::symlink(path, &symlink_path).unwrap();
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue