Commit 301d425
authored
Fixes rust-analyzer include_dirs for crates with generated sources (#3840)
When a crate contains generated sources, `include_dirs` needs to include
BOTH the root_module directory, and the generated sources directory.
When `include_dirs` is empty, the inclusion of the root_module directory
is done automatically, but when setting `include_dirs`, this needs to be
done manually.
See:
https://github.com/rust-lang/rust-analyzer/blob/a84d92ff213e30fb00d7b812e07c4f67e99dcd29/crates/project-model/src/project_json.rs#L123-L1311 parent 247703a commit 301d425
2 files changed
Lines changed: 11 additions & 3 deletions
File tree
- rust/private
- test/rust_analyzer/generated_srcs_test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
0 commit comments