rust-lang / rust-lang/rust-analyzer
Error tooltip wrapping at a weird spot
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
The line break before the backtick causes incorrect Markdown rendering.
The reason is that rust-analyzer responds with a \n before the backtick.
Steps to reproduce:
- Create a new project with cargo new.
- Rename src/main.rs with src/lib.rs.
- Override the contents of the file with this.
code snippet to reproduce:
mod front_of_house {
pub mod hosting {
pub fn add_to_waitlist() {}
}
}
mod customer {
pub fn eat_at_restaurant() {
hosting::add_to_waitlist();
}
}
rust-analyzer version: 0.3.2743
rustc version: rustc 1.91.1 (ed61e7d7e 2025-11-07)
editor or extension: VSCode
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 tooltip issue in VSCode using a cargo new project, rename src/main.rs to src/lib.rs, and use the provided Rust snippet. Start by tracing how rust-analyzer's error response is rendered when it contains a newline before a backtick. Done means the tooltip wraps normally and the Markdown backtick renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100