Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for std doesn't open correctly anymore #10082

Closed
CryZe opened this issue Aug 30, 2021 · 4 comments · Fixed by #10597
Closed

Documentation for std doesn't open correctly anymore #10082

CryZe opened this issue Aug 30, 2021 · 4 comments · Fixed by #10597
Labels
Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now

Comments

@CryZe
Copy link
Contributor

CryZe commented Aug 30, 2021

If I run "Rust Analyzer: Open docs under cursor" on any std or core symbol, it opens some invalid docs.rs page, such as this one for HashMap:

https://docs.rs/STD/0.1.0/std/collections/hash/map/struct.HashMap.html

@Veykril Veykril added the S-actionable Someone could pick this issue up and work on it right now label Aug 30, 2021
@CryZe
Copy link
Contributor Author

CryZe commented Aug 30, 2021

The reason seems to be that #![doc(html_root_url = "...")] is not specified for std / core / ... anymore, as they hardcoded "nightly" into that URL before.

rust-lang/rust#84942

@jyn514
Copy link
Member

jyn514 commented Aug 30, 2021

The reason seems to be that #![doc(html_root_url = "...")] is not specified for std / core / ... anymore,

It is specified, just as an argument and not as a hard-coded attribute.
https://github.com/rust-lang/rust/pull/84942/files#diff-cc65477e7704ede82e44907dcff240ecb0a547eddfadc515bb706e724068f8feR331

@jyn514
Copy link
Member

jyn514 commented Aug 30, 2021

That value is only available through metadata, not the source itself, but you might be able to copy the logic and parse the output of rustc --version.
https://github.com/rust-lang/rust/pull/84942/files#diff-6e3c7e8b58a9a198adc885bced48fff2c5fd9a1ee126ccce52166476a536807fR579

@mirao
Copy link

mirao commented Oct 16, 2021

Another example:

Used SW:

  • VSCode 1.61.1
  • rust-analyzer v0.2.776

@Veykril Veykril added the Broken Window Bugs / technical debt to be addressed immediately label Oct 17, 2021
bors bot added a commit that referenced this issue Oct 20, 2021
10597: fix: Fix standard library doclinks not going to the correct page r=Veykril a=Veykril

Fixes #10082
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
@bors bors bot closed this as completed in 25a498b Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants