about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.vscode/settings.json3
-rw-r--r--Readme.md2
2 files changed, 4 insertions, 1 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 834a1362caf..491646ce59b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,8 +1,9 @@
 {
     "editor.formatOnSave": true,
 
-    // source for rustc_* is not included in the rust-src component; disable the errors about this
+    // in case rustc.source is disabled for performance reasons; disable the errors about this
     "rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate", "unresolved-macro-call"],
+    "rust-analyzer.rustc.source": "discover",
     "rust-analyzer.imports.granularity.enforce": true,
     "rust-analyzer.imports.granularity.group": "module",
     "rust-analyzer.imports.prefix": "crate",
diff --git a/Readme.md b/Readme.md
index 1c48097da2a..4f455261963 100644
--- a/Readme.md
+++ b/Readme.md
@@ -121,6 +121,8 @@ You need to do this steps to successfully compile and use the cranelift backend
   * (Optional) run tests: `rustup run stage2 ./y.sh test`
 8. Now you can use your cg_clif build to compile other Rust programs, e.g. you can open any Rust crate and run commands like `$RustCheckoutDir/compiler/rustc_codegen_cranelift/dist/cargo-clif build --release`.
 
+You can also set `rust-analyzer.rustc.source` to your rust workspace to get rust-analyzer to understand your changes.
+
 ## Configuration
 
 See the documentation on the `BackendConfig` struct in [config.rs](src/config.rs) for all