rust-lang / rust-lang/rust-analyzer

New rustc output in tooltips shows path when it shouldn't

Open
#13,663 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-vscode C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

First of all, the new feature works great!

compiler diagnostic error overlay in VSCode

I believe that the second line in the output describing the full path isn't supposed to be there, as it is entirely redundant: the tooltip is being shown inline at the right span, the user doesn't need the span context. I wonder if it is because of an overly restrictive regex that didn't account for the leading whitespace?

cc @Veykril

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the rustc diagnostic shown in the issue and inspect the tooltip formatting or matching logic, including the suspected leading-whitespace regex case. Done means the inline tooltip no longer includes the redundant full-path context while preserving the useful diagnostic output.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.