Skip to content

Commit b0250fc

Browse files
authored
Merge pull request #1444 from Nilstrieb/ra-rustc
Use `rust-analyzer.rustc.source` to get r-a working with rustc
2 parents b3b36e9 + 6fea128 commit b0250fc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"editor.formatOnSave": true,
33

4-
// source for rustc_* is not included in the rust-src component; disable the errors about this
4+
// in case rustc.source is disabled for performance reasons; disable the errors about this
55
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate", "unresolved-macro-call"],
6+
"rust-analyzer.rustc.source": "discover",
67
"rust-analyzer.imports.granularity.enforce": true,
78
"rust-analyzer.imports.granularity.group": "module",
89
"rust-analyzer.imports.prefix": "crate",

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ You need to do this steps to successfully compile and use the cranelift backend
121121
* (Optional) run tests: `rustup run stage2 ./y.sh test`
122122
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`.
123123

124+
You can also set `rust-analyzer.rustc.source` to your rust workspace to get rust-analyzer to understand your changes.
125+
124126
## Configuration
125127

126128
See the documentation on the `BackendConfig` struct in [config.rs](src/config.rs) for all

0 commit comments

Comments
 (0)