rust-lang / rust-lang/rust-analyzer
Doc links to methods on primitives aren't resolved
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 0.3.2555-standalone
rustc version: 1.89.0
editor or extension: VSCode
relevant settings: none
code snippet to reproduce:
/// [`slice::sort`] [`slice::copy_within`]
fn f() {}
Neither of the links are resolved by rust-analyzer. rustdoc does not complain about them and links them to the right method.
If use std::slice; is in scope, slice::sort will be incorrectly resolved to the internal sort module.
It seems like rustdoc treats these methods specially, since you cannot actually refer to slice::sort in Rust code like that.
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
Start with the Rust snippet in the issue and compare rust-analyzer's handling of slice::sort and slice::copy_within with rustdoc's link resolution. Investigate the documentation-link resolution entry point, including the case where use std::slice; is in scope. Done means both links resolve correctly without resolving slice::sort to the internal sort module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100