diff options
| author | Ali Bektas <bektasali@protonmail.com> | 2024-08-22 20:49:51 +0200 |
|---|---|---|
| committer | Ali Bektas <bektasali@protonmail.com> | 2024-08-28 19:33:21 +0200 |
| commit | 7360dfe3f1b79acd54d3d8522bfb917d517e5866 (patch) | |
| tree | a586ffd4275d9c28df7fb4599c656f3805a1aec2 | |
| parent | 2ddb4e14807691588d21d0d1ae886f2913c3ecf3 (diff) | |
| download | rust-7360dfe3f1b79acd54d3d8522bfb917d517e5866.tar.gz rust-7360dfe3f1b79acd54d3d8522bfb917d517e5866.zip | |
Make rustc_* workspace
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index 675882e55f1..3499cf92595 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/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 { |
