rust-lang / rust-lang/rust-analyzer
The output of the program is treated as a Rustc diagnostic message
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 69
Description
rust-analyzer version: 0.3.1194-standalone (67920f797 2022-09-04)
rustc version: rustc 1.61.0 (fe5b13d68 2022-05-18)
It seems that RA can't distinguish well between the output of Rust compiler and the output of the program. When I print a string similar to the Rust diagnostic message, VS Code reports it as a Rust error.
I found this problem because I was writing a diagnostic engine similar to Rustc's, and these red lines kept appearing in my test files.
To reproduce this issue in VSCode, you need to use the run button on the main function.
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 issue in VS Code using the Run button on a main function, printing text that resembles a Rust diagnostic. Start by tracing how rust-analyzer distinguishes compiler diagnostics from program output; done means diagnostic-like program output is not reported as a Rust error while actual compiler diagnostics still are.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100