Skip to content

Error tooltip wrapping at a weird spot #21409

@CodingDoll

Description

@CodingDoll
Image

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:

  1. Create a new project with cargo new.
  2. Rename src/main.rs with src/lib.rs.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions