Clarifying behavior of rust-project.json source.include_dirs
#16792
Labels
C-support
Category: support questions
source.include_dirs
#16792
I have a project structured like...
I want to refer to the module
foo
fromsrc/lib.rs
. I thought I could do that with a rust-project.json that looks like...But
mod foo;
insrc/lib.rs
results inunresolved module, can't find module file: foo.rs, or foo/mod.rs
.I think this happens because the attempt to resolve the path to the module is relative to the original file:
rust-analyzer/crates/hir-def/src/nameres/mod_resolution.rs
Lines 92 to 95 in 2397e7a
so only paths in
src
are considered:rust-analyzer/crates/vfs/src/file_set.rs
Lines 30 to 35 in 2397e7a
Should this work, or am I misunderstanding
include_dirs
?The text was updated successfully, but these errors were encountered: