rust-lang / rust-lang/rust-analyzer
rust-analyzer doesn't show some errors from cargo check
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 0.4.1196
rustc version: rustc 1.60.0 (7737e0b5c 2022-04-04)
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME).
- RUSTUP_HOME: /usr/local/rustup.
- CARGO_HOME: /usr/local/cargo
Basically, my code has errors that rust-analyzer doesn't pick up. This doesn't happen for all errors. It all started one or two versions back.
- Errors from rust check:
. - No error on my IDE on the same line:
Sadly, this is a private project so I can't really share the repo. I'm unsure how to proceed to get help. I tried to make a repro but it's hard because only some errors are not shown.
If that counts, I use cargo workspace, and from searching, seems rust-analyzer has trouble with that sometimes.
Again sorry that I can't provide a reproduction, but maybe off the bat there's something I can do?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rust-analyzer troubleshooting guide and compare cargo check diagnostics with the IDE output using a minimal Rust project. Investigate whether the behavior depends on the cargo workspace setup or the reported rust-analyzer and rustc versions. Done means the missing diagnostics are reproduced and rust-analyzer reports the same relevant errors, or the issue is narrowed to a documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100