Anchoring to the SourceRoot wont' work if the path is absolute: #[path = "/tmp/foo.rs"] mod foo; Anchoring to a file will. However, we *should* anchor, instead of just producing an abs path. I can imagine a situation where, for example, rust-analyzer processes crates from different machines (or, for example, from in-memory git branch), where the same absolute path in different crates might refer to different files in the end! |
||
|---|---|---|
| .. | ||
| change.rs | ||
| defs.rs | ||
| imports_locator.rs | ||
| lib.rs | ||
| line_index.rs | ||
| search.rs | ||
| source_change.rs | ||
| symbol_index.rs | ||
| wasm_shims.rs | ||