Skip to content

Commit 9771e1e

Browse files
committed
Don't pass any target directory options to custom flycheck
1 parent 2290cc3 commit 9771e1e

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

crates/flycheck/src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ pub enum FlycheckConfig {
5858
extra_env: FxHashMap<String, String>,
5959
invocation_strategy: InvocationStrategy,
6060
invocation_location: InvocationLocation,
61-
target_dir: Option<PathBuf>,
6261
},
6362
}
6463

@@ -355,7 +354,6 @@ impl FlycheckActor {
355354
extra_env,
356355
invocation_strategy,
357356
invocation_location,
358-
target_dir,
359357
} => {
360358
let mut cmd = Command::new(command);
361359
cmd.envs(extra_env);
@@ -377,10 +375,6 @@ impl FlycheckActor {
377375
}
378376
}
379377

380-
if let Some(target_dir) = target_dir {
381-
cmd.arg("--target-dir").arg(target_dir);
382-
}
383-
384378
(cmd, args)
385379
}
386380
};

crates/rust-analyzer/src/config.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,6 @@ impl Config {
12891289
}
12901290

12911291
pub fn flycheck(&self) -> FlycheckConfig {
1292-
let target_dir = self.target_dir_from_config();
12931292
match &self.data.check_overrideCommand {
12941293
Some(args) if !args.is_empty() => {
12951294
let mut args = args.clone();
@@ -1310,7 +1309,6 @@ impl Config {
13101309
}
13111310
InvocationLocation::Workspace => flycheck::InvocationLocation::Workspace,
13121311
},
1313-
target_dir,
13141312
}
13151313
}
13161314
Some(_) | None => FlycheckConfig::CargoCommand {
@@ -1345,7 +1343,7 @@ impl Config {
13451343
extra_args: self.check_extra_args(),
13461344
extra_env: self.check_extra_env(),
13471345
ansi_color_output: self.color_diagnostic_output(),
1348-
target_dir,
1346+
target_dir: self.target_dir_from_config(),
13491347
},
13501348
}
13511349
}

0 commit comments

Comments
 (0)