Commit b586947
committed
rust-project: populate
According to
https://rust-analyzer.github.io/book/non_cargo_based_projects.html,
rust-analyzer should compute `sysroot_src` from `sysroot` if it is
absent.
According to my testing, this is not the case, and rust-analyzer is
broken if `sysroot_src` is not populated.
To fix this, we populate it from a new `--sysroot-src` flag, or the de facto standard
`RUST_SRC_PATH`, which fixes the issue.
Ideally, rust-analyzer should be fixed but:
1. I haven't gotten to the bottom of that bug.
2. This commit remains correct in the meantime.
3. This commit allows setups where the binary sysroot and source
sysroots are different (as is the case in Nixpks, where they come
from different packages).sysroot_src
1 parent 4214c15 commit b586947
File tree
3 files changed
+43
-8
lines changed- integrations/rust-project/src
- cli
3 files changed
+43
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| |||
126 | 141 | | |
127 | 142 | | |
128 | 143 | | |
129 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
130 | 148 | | |
131 | 149 | | |
132 | 150 | | |
133 | 151 | | |
134 | 152 | | |
135 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
136 | 158 | | |
137 | 159 | | |
138 | 160 | | |
| |||
279 | 301 | | |
280 | 302 | | |
281 | 303 | | |
282 | | - | |
283 | | - | |
284 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
285 | 310 | | |
286 | 311 | | |
287 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
0 commit comments