`unresolved import` for some `#[path = ".."]

  • OS: Linux (Arch LInux)
  • Toolchain: stable-x86_64-unknown-linux-gnu (1.42.0)
  • rust-analyzer: 779555c

unresolved import errors show up for:

  1. File paths whose extensions are not rs
  2. Absolute file paths
  3. Outside of the workspace (or simply workspace_root or somewhere?)

rust-analzyer

These files do exist.

$ tree -I target "$PWD"
/home/ryo/src/local/a
├── Cargo.lock
├── Cargo.toml
├── empty-file
├── empty-file.rs
└── src
    └── main.rs

1 directory, 7 files
$ touch ./src/main.rs && cargo clippy
    Checking a v0.1.0 (/home/ryo/src/local/a)
    Finished dev [unoptimized + debuginfo] target(s) in 0.47s
$ # OK