rust-lang / rust-lang/rust-analyzer

Better support for regular comments

Open
#21,128 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

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:

https://github.com/rust-lang/rust-analyzer/blob/45ae0abfedfa5b15d7825ac7e572287c5f45ab7f/crates/ide/src/goto_definition.rs#L71

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

Start by reading crates/ide/src/goto_definition.rs around line 71 and investigate how // SAFETY: comments are currently treated. Compare the current IDE behavior for intra-doc links in regular comments with the requested experience; done means the desired link support is clearly defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.