Skip to content

Disambiguators are stripped off intra-doc link titlesΒ #16876

Open
@msix29

Description

@msix29

rust-analyzer version: 0.3.1877-standalone (574e23e 2024-03-09)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
relevant settings: Irrelevant to the issue.
repository link: luau-parser. Irrelevant to the issue.

code snippet to reproduce:

// This is an overly simplified version of it.

/// Some [function parameter](FunctionParameter)
pub struct FunctionParameter {}

Hover over FunctionParameters and read the doc comments, it displays:

image

The (reserved) keyword function is gone. I thought it was maybe because of the text being the same as that of the struct it's linking to, so for the sake of making sure, I tried another keyword:

/// Some [enum parameter](FunctionParameters)
pub struct FunctionParameters {}

And it gives exactly the same result. The word enum vanishes.

Some notes:

  • The issue exists for inner doc comments too (//!).
  • This is case sensitive; using Function or Enum makes it visible.
  • This seems to work when having a different character there, for example function/parameter.
  • It seems to work just fine with keywords like for and in, which means this may have been an intentional thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doc-commentsdoc string related issuesC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions