Unnamed repository; edit this file 'description' to name the repository.
Make rustc_* workspace
Ali Bektas 2024-08-29
parent 65d39f3 · commit c304cee
-rw-r--r--crates/rust-analyzer/src/config.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 675882e55f..3499cf9259 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -124,16 +124,6 @@ config_data! {
/// This config takes a map of crate names with the exported proc-macro names to ignore as values.
procMacro_ignored: FxHashMap<Box<str>, Box<[Box<str>]>> = FxHashMap::default(),
- /// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
- /// projects, or "discover" to try to automatically find it if the `rustc-dev` component
- /// is installed.
- ///
- /// Any project which uses rust-analyzer with the rustcPrivate
- /// crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
- ///
- /// This option does not take effect until rust-analyzer is restarted.
- rustc_source: Option<String> = None,
-
/// Enables automatic discovery of projects using [`DiscoverWorkspaceConfig::command`].
///
@@ -433,6 +423,16 @@ config_data! {
/// [`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
runnables_extraTestBinaryArgs: Vec<String> = vec!["--show-output".to_owned()],
+ /// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
+ /// projects, or "discover" to try to automatically find it if the `rustc-dev` component
+ /// is installed.
+ ///
+ /// Any project which uses rust-analyzer with the rustcPrivate
+ /// crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
+ ///
+ /// This option does not take effect until rust-analyzer is restarted.
+ rustc_source: Option<String> = None,
+
/// Additional arguments to `rustfmt`.
rustfmt_extraArgs: Vec<String> = vec![],
/// Advanced option, fully override the command rust-analyzer uses for
@@ -1799,7 +1799,7 @@ impl Config {
}
pub fn cargo(&self, source_root: Option<SourceRootId>) -> CargoConfig {
- let rustc_source = self.rustc_source().as_ref().map(|rustc_src| {
+ let rustc_source = self.rustc_source(source_root).as_ref().map(|rustc_src| {
if rustc_src == "discover" {
RustLibSource::Discover
} else {