Skip to content

Commit 7360dfe

Browse files
committed
Make rustc_* workspace
1 parent 2ddb4e1 commit 7360dfe

File tree

1 file changed

+11
-11
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+11
-11
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +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-
/// 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-
137127

138128
/// Enables automatic discovery of projects using [`DiscoverWorkspaceConfig::command`].
139129
///
@@ -433,6 +423,16 @@ config_data! {
433423
/// [`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
434424
runnables_extraTestBinaryArgs: Vec<String> = vec!["--show-output".to_owned()],
435425

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+
436436
/// Additional arguments to `rustfmt`.
437437
rustfmt_extraArgs: Vec<String> = vec![],
438438
/// Advanced option, fully override the command rust-analyzer uses for
@@ -1799,7 +1799,7 @@ impl Config {
17991799
}
18001800

18011801
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| {
18031803
if rustc_src == "discover" {
18041804
RustLibSource::Discover
18051805
} else {

0 commit comments

Comments
 (0)