rust-lang / rust-lang/rust-analyzer
False-positive diagnostics in regular code of a large codebase
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: rust-analyzer version: 0.4.1834-standalone (c48f14553 2024-02-07)
rustc version: rustc 1.75.0 (82e1608df 2023-12-21)
Open Zed, wait for r-a to load it and produce diagnostics in this file:
https://github.com/zed-industries/zed/blob/bde509fa749da60beb4ac378afd3ade15297bb91/crates/project/src/project.rs#L580
Expected: zero warnings/errors, same as cargo check --workspace --all-targets outputs
Actual: node and fs are labeled as "unused variables" but are used a few lines below, 2 more "errors" are also false-positive
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
Reproduce the diagnostics in Zed's crates/project/src/project.rs at the referenced location using the reported rust-analyzer and rustc versions. Compare the editor diagnostics for node, fs, and the other reported errors with cargo check --workspace --all-targets; done means the false-positive diagnostics no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100