Skip to content

Commit 09ef79a

Browse files
committed
Make the fake flycheck path work on windows
1 parent 6c0ab17 commit 09ef79a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/rust-analyzer/src/flycheck.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use std::{fmt, io, process::Command, time::Duration};
55

66
use crossbeam_channel::{select_biased, unbounded, Receiver, Sender};
7-
use paths::{AbsPath, AbsPathBuf, Utf8Path, Utf8PathBuf};
7+
use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
88
use project_model::{project_json, TargetKind};
99
use rustc_hash::FxHashMap;
1010
use serde::Deserialize;
@@ -618,11 +618,8 @@ impl FlycheckActor {
618618
}
619619

620620
fn cannot_run_workspace(&self) -> bool {
621-
self.check_command(
622-
PackageToRestart::All,
623-
Some(AbsPath::assert(Utf8Path::new("/tmp/thing.txt"))),
624-
)
625-
.is_none()
621+
let fake_path = self.root.join("fake.rs");
622+
self.check_command(PackageToRestart::All, Some(&fake_path)).is_none()
626623
}
627624

628625
/// Construct a `Command` object for checking the user's code. If the user

0 commit comments

Comments
 (0)