Skip to content

Better support for regular comments #21128

@ThierryBerger

Description

@ThierryBerger

In the context of unsafe, it's advised to add // SAFETY: comments, there's even a clippy lint for that.

Those comments are highly important, but their developer experience is sub-par: intra-doc links are not supported by the ide. (cargo test --docs doesn't check those either, but it's a different subject).

I'd like to discuss it that's possible to improve this experience.

Tech breadcrumbs

Disclaimer, I'm not familiar with rust-analyzer inner workings.

It seems around here, we may be able to lower constraints on that step:

if let Some(doc_comment) = token_as_doc_comment(&original_token) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions