You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.**Check version compatibility**: Ensure your LLVM version is compatible with your Rust toolchain
50
+
3. Ensure your LLVM version is compatible with your Rust toolchain
51
51
52
-
### Configuring `rust-analyzer` for Out-of-Tree Projects
52
+
### Configuring `rust-analyzer` for out-of-tree projects
53
53
54
54
When developing out-of-tree projects that use `rustc_private` crates, you can configure `rust-analyzer` to recognize these crates.
55
55
56
56
#### Configuration Steps
57
57
58
-
1.**Set rust-analyzer configuration**
59
-
Configure `rust-analyzer.rustc.source` to `"discover"` in your editor settings.
58
+
1. Configure `rust-analyzer.rustc.source` to `"discover"` in your editor settings.
60
59
For VS Code, add to `rust_analyzer_settings.json`:
61
60
```json
62
61
{
63
62
"rust-analyzer.rustc.source": "discover"
64
63
}
65
64
```
66
-
2.**Add metadata to Cargo.toml**
67
-
Add the following to the `Cargo.toml` of every crate that uses `rustc_private`:
65
+
66
+
2. Add the following to the `Cargo.toml` of every crate that uses `rustc_private`:
68
67
```toml
69
68
[package.metadata.rust-analyzer]
70
69
rustc_private = true
@@ -74,4 +73,6 @@ This configuration allows `rust-analyzer` to properly recognize and provide IDE
74
73
75
74
### Additional Resources
76
75
77
-
-[GitHub Issue #137421](https://github.com/rust-lang/rust/issues/137421): Explains that `rustc_private` linker failures often occur because `llvm-tools` is not installed
76
+
-[GitHub Issue #137421] explains that `rustc_private` linker failures often occur because `llvm-tools` is not installed
0 commit comments