@@ -124,16 +124,6 @@ config_data! {
124
124
/// This config takes a map of crate names with the exported proc-macro names to ignore as values.
125
125
procMacro_ignored: FxHashMap <Box <str >, Box <[ Box <str >] >> = FxHashMap :: default ( ) ,
126
126
127
- /// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
128
- /// projects, or "discover" to try to automatically find it if the `rustc-dev` component
129
- /// is installed.
130
- ///
131
- /// Any project which uses rust-analyzer with the rustcPrivate
132
- /// crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
133
- ///
134
- /// This option does not take effect until rust-analyzer is restarted.
135
- rustc_source: Option <String > = None ,
136
-
137
127
138
128
/// Enables automatic discovery of projects using [`DiscoverWorkspaceConfig::command`].
139
129
///
@@ -433,6 +423,16 @@ config_data! {
433
423
/// [`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
434
424
runnables_extraTestBinaryArgs: Vec <String > = vec![ "--show-output" . to_owned( ) ] ,
435
425
426
+ /// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
427
+ /// projects, or "discover" to try to automatically find it if the `rustc-dev` component
428
+ /// is installed.
429
+ ///
430
+ /// Any project which uses rust-analyzer with the rustcPrivate
431
+ /// crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
432
+ ///
433
+ /// This option does not take effect until rust-analyzer is restarted.
434
+ rustc_source: Option <String > = None ,
435
+
436
436
/// Additional arguments to `rustfmt`.
437
437
rustfmt_extraArgs: Vec <String > = vec![ ] ,
438
438
/// Advanced option, fully override the command rust-analyzer uses for
@@ -1799,7 +1799,7 @@ impl Config {
1799
1799
}
1800
1800
1801
1801
pub fn cargo ( & self , source_root : Option < SourceRootId > ) -> CargoConfig {
1802
- let rustc_source = self . rustc_source ( ) . as_ref ( ) . map ( |rustc_src| {
1802
+ let rustc_source = self . rustc_source ( source_root ) . as_ref ( ) . map ( |rustc_src| {
1803
1803
if rustc_src == "discover" {
1804
1804
RustLibSource :: Discover
1805
1805
} else {
0 commit comments