@@ -124,20 +124,6 @@ config_data! {
124124 /// This config takes a map of crate names with the exported proc-macro names to ignore as values.
125125 procMacro_ignored: FxHashMap <Box <str >, Box <[ Box <str >] >> = FxHashMap :: default ( ) ,
126126
127- /// Command to be executed instead of 'cargo' for runnables.
128- runnables_command: Option <String > = None ,
129- /// Additional arguments to be passed to cargo for runnables such as
130- /// tests or binaries. For example, it may be `--release`.
131- runnables_extraArgs: Vec <String > = vec![ ] ,
132- /// Additional arguments to be passed through Cargo to launched tests, benchmarks, or
133- /// doc-tests.
134- ///
135- /// Unless the launched target uses a
136- /// [custom test harness](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field),
137- /// they will end up being interpreted as options to
138- /// [`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
139- runnables_extraTestBinaryArgs: Vec <String > = vec![ "--show-output" . to_owned( ) ] ,
140-
141127 /// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
142128 /// projects, or "discover" to try to automatically find it if the `rustc-dev` component
143129 /// is installed.
@@ -367,7 +353,7 @@ config_data! {
367353 checkOnSave | checkOnSave_enable: bool = true ,
368354
369355
370- /// Check all targets and tests (`--all-targets`). Defaults to
356+ /// Check all targets and tests (`--all-targets`). Defaults to
371357 /// `#rust-analyzer.cargo.allTargets#`.
372358 check_allTargets | checkOnSave_allTargets: Option <bool > = None ,
373359 /// Cargo command to use for `cargo check`.
@@ -433,6 +419,20 @@ config_data! {
433419 /// If false, `-p <package>` will be passed instead.
434420 check_workspace: bool = true ,
435421
422+ /// Command to be executed instead of 'cargo' for runnables.
423+ runnables_command: Option <String > = None ,
424+ /// Additional arguments to be passed to cargo for runnables such as
425+ /// tests or binaries. For example, it may be `--release`.
426+ runnables_extraArgs: Vec <String > = vec![ ] ,
427+ /// Additional arguments to be passed through Cargo to launched tests, benchmarks, or
428+ /// doc-tests.
429+ ///
430+ /// Unless the launched target uses a
431+ /// [custom test harness](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field),
432+ /// they will end up being interpreted as options to
433+ /// [`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
434+ runnables_extraTestBinaryArgs: Vec <String > = vec![ "--show-output" . to_owned( ) ] ,
435+
436436 /// Additional arguments to `rustfmt`.
437437 rustfmt_extraArgs: Vec <String > = vec![ ] ,
438438 /// Advanced option, fully override the command rust-analyzer uses for
@@ -1972,11 +1972,11 @@ impl Config {
19721972 * self . cargo_buildScripts_rebuildOnSave ( source_root)
19731973 }
19741974
1975- pub fn runnables ( & self ) -> RunnablesConfig {
1975+ pub fn runnables ( & self , source_root : Option < SourceRootId > ) -> RunnablesConfig {
19761976 RunnablesConfig {
1977- override_cargo : self . runnables_command ( ) . clone ( ) ,
1978- cargo_extra_args : self . runnables_extraArgs ( ) . clone ( ) ,
1979- extra_test_binary_args : self . runnables_extraTestBinaryArgs ( ) . clone ( ) ,
1977+ override_cargo : self . runnables_command ( source_root ) . clone ( ) ,
1978+ cargo_extra_args : self . runnables_extraArgs ( source_root ) . clone ( ) ,
1979+ extra_test_binary_args : self . runnables_extraTestBinaryArgs ( source_root ) . clone ( ) ,
19801980 }
19811981 }
19821982
0 commit comments