rust-analyzer: `#[path = "../XXXXXX"]` attribute on modules gives false `unresolved-module` error


Example: https://github.com/WilliamVenner/rust-analyzer-broken-example
Code:
./package/src/main.rs
#[path = "../../silly_mod/mod.rs"]
mod silly_mod;
fn main() {
silly_mod::hello();
}
./silly_mod/mod.rs
pub fn hello() {
println!("Hello, world!");
}
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 4
- Comments: 17 (8 by maintainers)
Yeah, I have this in my settings
I’ve also just run into this issue, I guess the more idiomatic way to handle this situation is to make the referenced module into a full blown library referenced by
path = "../path/to/module"inCargo.toml?