about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/docs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-06-22 10:39:19 +0200
committerRalf Jung <post@ralfj.de>2023-06-22 10:39:19 +0200
commit940cd59e39ce06bcacda3d342b97f28761555ba5 (patch)
tree8b2cc6943f54a3a3d4dab4ca9fd6c8a899543427 /src/tools/rust-analyzer/docs
parent2bd9ade66e28a1fa5c6609d12cd8461cfa36d809 (diff)
parent0faea7728f283dca5693f79be7615f67842c55dd (diff)
downloadrust-940cd59e39ce06bcacda3d342b97f28761555ba5.tar.gz
rust-940cd59e39ce06bcacda3d342b97f28761555ba5.zip
Merge from rustc
Diffstat (limited to 'src/tools/rust-analyzer/docs')
-rw-r--r--src/tools/rust-analyzer/docs/user/manual.adoc21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/docs/user/manual.adoc b/src/tools/rust-analyzer/docs/user/manual.adoc
index 5b9db10b093..b5c095fd9d8 100644
--- a/src/tools/rust-analyzer/docs/user/manual.adoc
+++ b/src/tools/rust-analyzer/docs/user/manual.adoc
@@ -244,7 +244,7 @@ Any other tools or libraries you will need to acquire  from Flatpak.
 
 Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
 
-To use `rust-analyzer`, you need to install and enable one of the two popular two popular LSP client implementations for Emacs, https://github.com/joaotavora/eglot[Eglot] or https://github.com/emacs-lsp/lsp-mode[LSP Mode]. Both enable `rust-analyzer` by default in rust buffers if it is available.
+To use `rust-analyzer`, you need to install and enable one of the two popular LSP client implementations for Emacs, https://github.com/joaotavora/eglot[Eglot] or https://github.com/emacs-lsp/lsp-mode[LSP Mode]. Both enable `rust-analyzer` by default in rust buffers if it is available.
 
 ==== Eglot
 
@@ -653,9 +653,28 @@ However, if you use some other build system, you'll have to describe the structu
 [source,TypeScript]
 ----
 interface JsonProject {
+    /// Path to the sysroot directory.
+    ///
+    /// The sysroot is where rustc looks for the
+    /// crates that are built-in to rust, such as
+    /// std.
+    ///
+    /// https://doc.rust-lang.org/rustc/command-line-arguments.html#--sysroot-override-the-system-root
+    ///
+    /// To see the current value of sysroot, you
+    /// can query rustc:
+    ///
+    /// ```
+    /// $ rustc --print sysroot
+    /// /Users/yourname/.rustup/toolchains/stable-x86_64-apple-darwin
+    /// ```
+    sysroot?: string;
     /// Path to the directory with *source code* of
     /// sysroot crates.
     ///
+    /// By default, this is `lib/rustlib/src/rust/library`
+    /// relative to the sysroot.
+    ///
     /// It should point to the directory where std,
     /// core, and friends can be found:
     ///