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

Update lots of doc links to use item paths instead of file paths #1223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LikeLakers2
Copy link

@LikeLakers2 LikeLakers2 commented Jan 1, 2025

Hi! I noticed that a lot of intra-doc links in rayon-core and rayon uses webpage links (i.e. iter/trait.ParallelExtend.html#tymethod.par_extend) instead of item paths (i.e. iter::ParallelExtend::par_extend()).

This PR converts as many intra-doc links as I could find into item paths. This ensures that if Rustdoc ever changes how its documentation is structured in the file system (unlikely, but not impossible), rayon and rayon-core's docs will continue to function as normal.

This PR also fixes a couple small pieces of documentation which I assume were meant to link to another item.

I made sure to double-check all of my work - and especially made sure the links would work when using cargo +1.63 doc (the msrv of Rayon) - but if you find any documentation links I missed, or any that are now broken, please let me know.

Notes:

  • /// [`crossbeam::scope`]: https://docs.rs/crossbeam/0.8/crossbeam/fn.scope.html
    - If crossbeam were a dependency of rayon-core, I would be able to change this to an item path. But alas, it is not.
  • /// [the `par_sort` method]: ../rayon/slice/trait.ParallelSliceMut.html#method.par_sort
    - Attempting to change this link to use an item path (i.e. rayon::slice::ParallelSliceMut::par_sort()) results in a broken link warning.
  • //! [arrays]: https://doc.rust-lang.org/std/primitive.array.html
    - I do not know how to link to the primitive using an item path; using std::array links to the std::array module rather than the [T; N] primitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant