mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
feat: Support passing multiple targets to cargo (for Rust 1.64.0+)
This commit is contained in:
parent
c6c932d3f3
commit
0d4737adb6
6 changed files with 87 additions and 35 deletions
|
@ -40,7 +40,7 @@ pub enum InvocationLocation {
|
|||
pub enum FlycheckConfig {
|
||||
CargoCommand {
|
||||
command: String,
|
||||
target_triple: Option<String>,
|
||||
target_triples: Vec<String>,
|
||||
all_targets: bool,
|
||||
no_default_features: bool,
|
||||
all_features: bool,
|
||||
|
@ -286,7 +286,7 @@ impl FlycheckActor {
|
|||
let (mut cmd, args) = match &self.config {
|
||||
FlycheckConfig::CargoCommand {
|
||||
command,
|
||||
target_triple,
|
||||
target_triples,
|
||||
no_default_features,
|
||||
all_targets,
|
||||
all_features,
|
||||
|
@ -300,7 +300,7 @@ impl FlycheckActor {
|
|||
cmd.args(&["--workspace", "--message-format=json", "--manifest-path"])
|
||||
.arg(self.root.join("Cargo.toml").as_os_str());
|
||||
|
||||
if let Some(target) = target_triple {
|
||||
for target in target_triples {
|
||||
cmd.args(&["--target", target.as_str()]);
|
||||
}
|
||||
if *all_targets {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue