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

rustup doc cannot open docs for std::mem::MaybeUninit #4002

Closed
2 tasks done
taylordotfish opened this issue Aug 21, 2024 · 1 comment · Fixed by #4004
Closed
2 tasks done

rustup doc cannot open docs for std::mem::MaybeUninit #4002

taylordotfish opened this issue Aug 21, 2024 · 1 comment · Fixed by #4004
Labels
Milestone

Comments

@taylordotfish
Copy link
Contributor

Verification

Problem

I tried to open the documentation for std::mem::MaybeUninit with the following command:

rustup doc std::mem::MaybeUninit

but got the following error:

error: No document for 'std::mem::MaybeUninit'

Steps

  1. Make sure the rust-docs component is installed for the active toolchain.
  2. Run rustup doc std::mem::MaybeUninit or rustup doc core::mem::MaybeUninit.

Possible Solution(s)

I believe the issue occurs because "union" is missing from keywords_mod in cli::topical_doc::local_path.

I expect that adding it to that array would fix the issue, although some discussion may be warranted concerning where in the array it should be inserted.

Notes

No response

Rustup version

rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.82.0-nightly (5aea14073 2024-08-20)`

Installed toolchains

Default host: powerpc64le-unknown-linux-gnu
rustup home:  /home/tmp/.rustup

installed toolchains
--------------------

stable-powerpc64le-unknown-linux-gnu
nightly-powerpc64le-unknown-linux-gnu (default)

installed targets for active toolchain
--------------------------------------

powerpc64le-unknown-linux-gnu
wasm32-unknown-unknown

active toolchain
----------------

nightly-powerpc64le-unknown-linux-gnu (default)
rustc 1.82.0-nightly (5aea14073 2024-08-20)

OS version

Debian GNU/Linux ppc64el trixie
@djc
Copy link
Contributor

djc commented Aug 21, 2024

I believe the issue occurs because "union" is missing from keywords_mod in cli::topical_doc::local_path.

I expect that adding it to that array would fix the issue, although some discussion may be warranted concerning where in the array it should be inserted.

Thanks for reporting & investigating. Would you be able to send a PR so we can discuss the change you have in mind?

github-merge-queue bot pushed a commit that referenced this issue Aug 24, 2024
Add "union" to the list of prefixes used when searching for
documentation.

Fixes #4002, where `rustup doc` fails to find the documentation for
`std::mem::MaybeUninit`.
@djc djc closed this as completed in #4004 Aug 24, 2024
@rami3l rami3l added this to the 1.28.0 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants