Skip to content

Commit c7b0914

Browse files
committed
Add more documentation for rustc_private
1 parent c484786 commit c7b0914

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,14 @@ config_data! {
180180
/// tests or binaries.\nFor example, it may be `--release`.
181181
runnables_cargoExtraArgs: Vec<String> = "[]",
182182

183-
/// Path to the rust compiler sources, for usage in rustc_private projects, or "discover"
184-
/// to try to automatically find it. Any project which uses rust-analyzer with the rustcPrivate
183+
/// Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
184+
/// projects, or "discover" to try to automatically find it.
185+
///
186+
/// Any project which uses rust-analyzer with the rustcPrivate
185187
/// crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
186-
rustcSource : Option<String> = "null",
188+
///
189+
/// This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.
190+
rustcSource: Option<String> = "null",
187191

188192
/// Additional arguments to `rustfmt`.
189193
rustfmt_extraArgs: Vec<String> = "[]",

docs/user/generated_config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
[[rust-analyzer.runnables.cargoExtraArgs]]rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
108108
Additional arguments to be passed to cargo for runnables such as tests or binaries.\nFor example, it may be `--release`.
109109
[[rust-analyzer.rustcSource]]rust-analyzer.rustcSource (default: `null`)::
110-
Path to the rust compiler sources, for usage in rustc_private projects, or "discover" to try to automatically find it. Any project which uses rust-analyzer with the rustcPrivate crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
110+
Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private projects, or "discover" to try to automatically find it. Any project which uses rust-analyzer with the rustcPrivate crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it. This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.
111111
[[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
112112
Additional arguments to `rustfmt`.
113113
[[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@
713713
}
714714
},
715715
"rust-analyzer.rustcSource": {
716-
"markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects, or \"discover\" to try to automatically find it. Any project which uses rust-analyzer with the rustcPrivate crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.",
716+
"markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private projects, or \"discover\" to try to automatically find it. Any project which uses rust-analyzer with the rustcPrivate crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it. This option is not reloaded automatically; you must restart rust-analyzer for it to take effect.",
717717
"default": null,
718718
"type": [
719719
"null",

0 commit comments

Comments
 (0)