Rust: Tracking Issue for intra-doc links in libstd

Created on 3 Aug 2020  路  107Comments  路  Source: rust-lang/rust

This is a tracking issue for switching libstd to intra-doc links (rust-lang/rfcs#1946, https://github.com/rust-lang/rust/pull/74430#issuecomment-664693080).

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Mentoring instructions (or rather, suggested workflow)

Please first leave a comment here stating that you want to work on file xxx.rs or module xxx, to make sure that this implements Sync.

  1. For each link of the form
[`Type`]: ../../std/module/kind.Name.html#method.foo

rewrite it as

[`Type`]: std::module::Name::foo

In most cases, the type will already be in scope, in which case you can remove the reference link altogether.
For an example PR, see https://github.com/rust-lang/rust/pull/74470.

  1. Run x.py doc library/std. This should warn(broken_intra_doc_links) by default.
  2. Fix any warnings that appear.
  3. Once you are ready to make a PR, run ./x.py tidy, which will run rustfmt.

In case of rustdoc bugs, there may be broken links that didn't show up when you ran x.py doc. However, these will be caught by the test suite, so you don't have to check them locally.

Suggested tools

Caveats

Primitives that have the same name as a module in scope must use type@ to disambiguate them. For example, to link to char from std, use type@char. This was changed in https://github.com/rust-lang/rust/pull/75318, char will now link to the primitive, not the module.

The following cannot use intra-doc links. If you run into an issue with them, it's ok to skip them. However, if you see an issue not mentioned here, please file a bug report!

  • Some primitives (notably slices and pointers): https://github.com/rust-lang/rust/issues/63351, https://github.com/rust-lang/rust/issues/74515
  • Links from core to std (https://github.com/rust-lang/rust/issues/74481)
  • Documentation is also tested with --stage 0, so you may not be able to make changes that require recently merged fixes: https://github.com/rust-lang/rust/pull/75368#issuecomment-672196852
  • Associated items anywhere other than documenting the associated item itself (https://github.com/rust-lang/rust/pull/74489) Fixed
  • Links on default function implementations for a trait (https://github.com/rust-lang/rust/issues/73829). Note that these will not warn if they fail to resolve, so you should be careful about modifying links on traits. Fixed

TODO list

This list was generated with rg '\[.*\]: \.\./.*' library/ -l | sed 's/^/- [ ] /' and may not be complete. If you see other links not mentioned here, feel free to fix them as well.

Since most files only have a few links, it's fine to claim multiple files at the same time.

Unclaimed

  • [ ] [std::convert::identity]: crate::convert::identity (https://github.com/rust-lang/rust/pull/75423#issuecomment-672641760)
  • [ ] [i32::MAX] (https://github.com/rust-lang/rust/pull/76093)
  • [ ] [crate::ptr] in libcore (https://github.com/rust-lang/rust/issues/76106)
  • [ ] [TcpStream::read]: Read::read (https://github.com/rust-lang/rust/pull/75674)

In-progress

  • [ ] library/core/src/num/mod.rs (Claimed by @jyn514 in https://github.com/rust-lang/rust/issues/75080#issuecomment-678635203)
  • [ ] library/core/src/str/mod.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-707376173)
  • [ ] [flush]: Write::flush (https://github.com/rust-lang/rust/pull/75674/files#diff-1eb455549b75a568d81f2f6a8a7020c0R446, claimed by @pitaj in https://github.com/rust-lang/rust/issues/75080#issuecomment-709773862)
  • [ ] floating point methods in intrinsics (see description of https://github.com/rust-lang/rust/pull/75705, claimed by @pitaj in https://github.com/rust-lang/rust/issues/75080#issuecomment-709773862)

Completed

  • [x] library/core/src/time.rs (claimed by @denisvasilik)
  • [x] library/core/src/cmp.rs (claimed by @denisvasilik)
  • [x] library/core/src/borrow.rs (claimed by @denisvasilik)
  • [x] library/std/src/path.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-670714996)
  • [x] library/std/src/os/*/fs.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-671775178). Note that the PR is only a partial fix since there are associated items that cannot be fixed until #74489 is merged.
  • [x] library/std/src/time.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-671506429)
  • [x] library/std/src/prelude/mod.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-671498866)
  • [x] library/std/src/io/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-672208727)
  • [x] library/std/src/lib.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-673108473)
  • [x] library/std/src/ffi/*.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-673683494)
  • [x] library/std/src/os/raw/*.md (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-673850375)
  • [x] library/std/src/net/*.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-674420243)
  • [x] library/std/src/sys/windows/ext/fs.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674546349)
  • [x] library/std/src/sys/windows/ext/process.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674546349)
  • [x] library/std/src/sys/windows/ext/ffi.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674546349)
  • [x] library/std/src/process.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-672208727)
  • [x] library/core/src/option.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-672208727)
  • [x] library/core/src/mem/manually_drop.rs (claimed by @chansuke)
  • [x] library/core/src/mem/maybe_uninit.rs (claimed by @chansuke)
  • [x] library/core/src/hint.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-671972852)
  • [x] library/std/src/panic.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-673108473)
  • [x] library/std/src/ascii.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-673108473)
  • [x] library/std/src/fs.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-673108473)
  • [x] library/core/src/any.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-671972852)
  • [x] library/core/src/char/convert.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-671972852)
  • [x] library/std/src/sys/vxworks/ext/process.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674385600)
  • [x] library/std/src/sys/vxworks/ext/fs.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674385600)
  • [x] library/std/src/error.rs (Claimed by @ellennyan in https://github.com/rust-lang/rust/issues/75080#issuecomment-674670058)
  • [x] library/std/src/alloc.rs (Claimed by @ellennyan in https://github.com/rust-lang/rust/issues/75080#issuecomment-674670058)
  • [x] library/std/src/env.rs (Claimed by @ellennyan in https://github.com/rust-lang/rust/issues/75080#issuecomment-674670058)
  • [x] library/std/src/keyword_docs.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-675085725)
  • [x] library/std/src/io/buffered.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-675577812)
  • [x] library/std/src/io/cursor.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-675577812)
  • [x] library/std/src/io/error.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-675577812)
  • [x] library/std/src/io/util.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-675577812)
  • [x] library/std/src/sys/unix/ext/fs.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674927625)
  • [x] library/std/src/sys/unix/ext/thread.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674927625)
  • [x] library/std/src/sys/unix/ext/process.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674927625)
  • [x] library/std/src/sys/unix/ext/net.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-674927625)
  • [x] library/core/src/result.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-672208727)
  • [x] library/std/src/thread/mod.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-677858423)
  • [x] library/std/src/thread/local.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-677858423)
  • [x] library/alloc/src/task.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-674531399)
  • [x] library/alloc/src/vec.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-674531399)
  • [x] library/core/src/intrinsics.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-674424720)
  • [x] library/alloc/src/macros.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/rc.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/sync.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/lib.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/string.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/collections/linked_list.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/slice.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/alloc.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/fmt.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/alloc/src/boxed.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-676667279)
  • [x] library/core/src/str/pattern.rs (Claimed @GuillaumeGomez in https://github.com/rust-lang/rust/issues/75080#issuecomment-678425507)
  • [x] library/core/src/ops/deref.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/index.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/function.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/drop.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/unsize.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/mod.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/arith.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/core/src/ops/range.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-677889559)
  • [x] library/std/src/sync/mutex.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678489872)
  • [x] library/std/src/sync/rwlock.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678489872)
  • [x] library/std/src/sync/condvar.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678489872)
  • [x] library/std/src/sync/mpsc/mod.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678489872)
  • [x] library/core/src/alloc/global.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-674424720)
  • [x] library/core/src/alloc/mod.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-674424720)
  • [x] library/core/src/alloc/layout.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-674424720)
  • [x] library/core/src/raw.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678685630)
  • [x] library/core/src/ffi.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678685630)
  • [x] library/core/src/pin.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678685630)
  • [x] library/std/src/os/illumos/fs.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678426304)
  • [x] library/std/src/os/openbsd/fs.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678426304)
  • [x] library/std/src/macros.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678426304)
  • [x] library/core/src/array/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/char/mod.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678691723)
  • [x] library/core/src/macros/mod.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678691723)
  • [x] library/core/src/fmt/mod.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678691723)
  • [x] library/proc_macro/src/lib.rs (Claimed by @LeSeulArtichaut in https://github.com/rust-lang/rust/issues/75080#issuecomment-678685630)
  • [x] library/std/src/collections/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678426304)
  • [x] library/core/src/future/future.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/num/dec2flt/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/array/iter.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/ptr/non_null.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-680242981)
  • [x] library/core/src/hash/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/std/src/primitive_docs.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-678738161)
  • [x] library/std/src/sys/wasi/ext/fs.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-678738161)
  • [x] library/std/src/sys_common/os_str_bytes.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-678738161)
  • [x] library/std/src/sys_common/poison.rs (Claimed by @kofls in https://github.com/rust-lang/rust/issues/75080#issuecomment-678738161)
  • [x] library/core/src/convert/mod.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-680118380)
  • [x] library/core/src/iter/mod.rs (Claimed by @nixphix in https://github.com/rust-lang/rust/issues/75080#issuecomment-680118380)
  • [x] library/core/src/slice/mod.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-680407017)
  • [x] library/core/src/clone.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-678464090)
  • [x] library/core/src/panic.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-678464090)
  • [x] library/core/src/iter/traits/iterator.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-678464090)
  • [x] library/core/src/marker.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/std/src/net/ip.rs (Claimed by @jyn514 in https://github.com/rust-lang/rust/issues/75080#issuecomment-685268033)
  • [x] library/std/src/fs.rs (Claimed by @jyn514 in https://github.com/rust-lang/rust/issues/75080#issuecomment-685268033)
  • [x] library/core/src/ptr/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/sync/atomic.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-678464090)
  • [x] library/core/src/mem/mod.rs (Claimed by @camelid in https://github.com/rust-lang/rust/issues/75080#issuecomment-678828026)
  • [x] library/core/src/iter/adapters/flatten.rs (Fixed by @pickfire in https://github.com/rust-lang/rust/pull/76707)
  • [x] library/core/src/iter/adapters/fuse.rs (Fixed by @pickfire in https://github.com/rust-lang/rust/pull/76778)
  • [x] library/alloc/src/collections/vec_deque.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/alloc/src/collections/vec_deque/drain.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/alloc/src/collections/btree/map.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/alloc/src/collections/linked_list.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/alloc/src/collections/binary_heap.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/std/src/sync/barrier.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694294986)
  • [x] library/std/src/sync/once.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694294986)
  • [x] library/core/src/iter/sources.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694319923)
  • [x] library/core/src/iter/traits/collect.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694319923)
  • [x] library/core/src/iter/traits/double_ended.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694319923)
  • [x] library/core/src/iter/traits/exact_size.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694319923)
  • [x] library/core/src/task/wake.rs (Claimed by @denisvasilik in https://github.com/rust-lang/rust/issues/75080#issuecomment-694362083)
  • [x] library/std/src/collections/hash/map.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-694347621)
  • [x] library/core/src/ascii.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-694347621)
  • [x] library/core/src/option.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-694347621)
  • [x] library/core/src/str/mod.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-694347621)
  • [x] library/core/src/str/pattern.rs (Claimed by @Amjad50 in https://github.com/rust-lang/rust/issues/75080#issuecomment-694347621)
  • [x] library/core/src/iter/adapters/mod.rs (Done by @pickfire in https://github.com/rust-lang/rust/issues/75080#issuecomment-694601285)
  • [x] library/core/src/future/pending.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694294986)
  • [x] library/core/src/future/poll_fn.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694294986)
  • [x] library/core/src/future/ready.rs (Claimed by @poliorcetics in https://github.com/rust-lang/rust/issues/75080#issuecomment-694294986)

Cannot be fixed

The following links cannot yet be fixed due to limitations in rustdoc.

  • [ ] [Vec::get_mut] (https://github.com/rust-lang/rust/pull/75672#discussion_r472322546)
A-intra-doc-links C-tracking-issue E-easy E-mentor T-doc T-rustdoc

Most helpful comment

Hello !

I wrote a Python (3.6+, tested with 3.7 and 3.8) script to help with this issue, here is the gist.

By default it will not modify the files you pass it, only showing what it would do. You can find more informations about it in the documentation of the script.

Feel free to use it to speed up the work but be aware it is not perfect and you still review the whole file as well as any changes it makes. It may miss lines or modify some that shouldn't be modified. It is not aware of uses so some modification will make the docs fail to compile but on the whole it should be good enough to help with this tedious task. 馃槃

The script should preserve indentation perfectly if nothing else so you shouldn't have to rerun x.py fmt <file> 馃.

I attached an example of the output produced by the script, please check yours is similar before applying its proposed changes:

Screenshot 2020-08-08 at 16 17 50

All 107 comments

Hi @jyn514, I would like to work on the following files:

  • library/core/src/time.rs
  • library/core/src/cmp.rs
  • library/core/src/borrow.rs

Go for it!

Many of these links can be brute force replaced using a regex, for items such as ... ../../std/stuff/something.Item.html it can be brute forced with (\[.*\]: )\.\.\/\.\.\/std\/(\w*)\/(\w*)\.(\w*)\.html[^#], then replacing with $1std::$2::$4\n, many more like method ones can also be knocked out using regex replacement, that regex alone can knock out 384 links. So that might be something worth exploring so less work has to be done with replacing boring links like these

Method links and others (207) can be caught with (\[.*\]: )\.\.\/\.\.\/std\/(\w*)\/(\w*)\.(\w*)\.html#\w+\.(\w*) and replaced with $1std::$2::$4::$5\n, although as pointed out by @jyn514, some of these are broke even if the replacement is correct, so that will have to be checked manually.

Intrinsics furthermore has a lot (~80) of special ones which match (\[.*\])\(\.\.\/\.\.\/std\/(\w*)\/(\w*)\/\w*\.(\w*)\.\w+\) which can be replaced with $1(std::$2::$3::$4). There is another small use of this but with ../../std/module/stuff which can be matched with (\[.*\])\(\.\.\/\.\.\/std\/(\w*)\/\w*\.(\w*)\.\w+\) and replaced with $1(std::$2::$3)

Go ahead and try the regex approach, if there are conflcits we can try and resolve them.

I ran all replacements, then ran ./x.py test src/tools/linkchecker library/std, and there were no warnings. So i assume all of them worked correctly, however from my convo with @jyn514 some should not really work because they are fundamentally broken? so i am not quite sure if that is not the case or if testing is not working for me.

I'm not sure which ones you think will be broken.

I'm not sure which ones you think will be broken.

Associated items anywhere other than documenting the associated item itself (#74489)

so i am not quite sure if that is not the case or if testing is not working for me.

You can check by manually introducing a broken link and see if it's caught. If so, the tests are working :) I recommend --keep-stage 0 --keep-stage 1 for that so you don't have to rebuild the compiler (edit: after building the compiler for the first time - you can't keep a stage that hasn't been built!).

Hi @RDambrosio016, could you do that for time.rs cmp.rs and borrow.rs as well? It's great to have a more automated variant.

@denisvasilik not quite sure what you mean by do it for those files, as far as i can see all of the replacements in those files work. I identified another pattern of ../../std/module/index.html, which can be matched with \.\.\/\.\.\/std\/(\w*)\/index\.html and replaced with std::$1, as well as ../../std/primitive.primitive.html (not only primitive but also macro and others) which can be matched with \.\.\/\.\.\/std\/\w*\.(\w*)\.html and replaced with std::$1. i am not aware of any other major patterns, but if you are then please post it here and make a regex replacement, or just post it and i will do it when i have time 馃憤

I had troubles with files located under library/core. I guess it has something to do with the caveats mentioned above, which states that intra-doc links from core to std are not possible.

Yeah a fair amount of these replacement may be broken, but the goal of this is to overall reduce the amount of changes needed to be done.

Here's another regex slightly modified to match core and std.
Example matches:

[`Add`]: ../../std/ops/trait.Add.html
[`GlobalAlloc`]: ../../core/alloc/trait.GlobalAlloc.html

Regex: (\[.*\]: )\.\.\/\.\.\/(core|std)\/(\w*)\/(\w*)\.(\w*)\.html[^#]
Replace: $1$2::$3::$5\n

I saw that I cannot reference std in time.rs. For example I tried to do the following replacements:

 [`ops`]: ../../std/ops/index.html
 [`ops`]: std::ops (results in unresolved link)
 [`ops`]: core::ops (results in unresolved link)

If I add use create::ops it works, but I get a warning, because that import is just used for documentation. Is there another way to handle this or should I just leave these kind of links as is?

If I add use create::ops it works, but I get a warning, because that import is just used for documentation. Is there another way to handle this or should I just leave these kind of links as is?

Use crate::ops in the link instead:

 [`ops`]: crate::ops

Intra-doc links follow (almost) exactly the same rules as normal name resolution.

Thank you for the detailed explanation. I would like to work on:

  • library/core/src/mem/manually_drop.rs
  • library/core/src/mem/maybe_uninit.rs

I'll take library/std/src/path.rs.

Hello !

I wrote a Python (3.6+, tested with 3.7 and 3.8) script to help with this issue, here is the gist.

By default it will not modify the files you pass it, only showing what it would do. You can find more informations about it in the documentation of the script.

Feel free to use it to speed up the work but be aware it is not perfect and you still review the whole file as well as any changes it makes. It may miss lines or modify some that shouldn't be modified. It is not aware of uses so some modification will make the docs fail to compile but on the whole it should be good enough to help with this tedious task. 馃槃

The script should preserve indentation perfectly if nothing else so you shouldn't have to rerun x.py fmt <file> 馃.

I attached an example of the output produced by the script, please check yours is similar before applying its proposed changes:

Screenshot 2020-08-08 at 16 17 50

Doing library/std/src/prelude/mod.rs.

I also updated the gist to handle tymethod on traits as well as links to module -- those should be heavily checked, I think they can interfere with links to the the book for example if the right (well, wrong) pattern appears.

Doing library/std/src/time.rs right now.

I'll take all the files of form library/std/src/os/*/fs.rs these files have minimal diff (one per file) I could fit them all in a PR

here's the complete list

library/std/src/os/macos/fs.rs
library/std/src/os/dragonfly/fs.rs
library/std/src/os/ios/fs.rs
library/std/src/os/android/fs.rs
library/std/src/os/redox/fs.rs
library/std/src/os/freebsd/fs.rs
library/std/src/os/emscripten/fs.rs
library/std/src/os/openbsd/fs.rs
library/std/src/os/solaris/fs.rs
library/std/src/os/illumos/fs.rs
library/std/src/os/fuchsia/fs.rs
library/std/src/os/haiku/fs.rs
library/std/src/os/vxworks/fs.rs
library/std/src/os/netbsd/fs.rs
library/std/src/os/linux/fs.rs

I'll take these files:

  • library/core/src/any.rs
  • library/core/src/hint.rs
  • library/core/src/char/convert.rs

I'll work on:

  • library/std/src/io/mod.rs
  • library/std/src/process.rs
  • library/core/src/option.rs
  • library/core/src/result.rs

@jyn514 it says that I claimed library/std/src/os/*/fs.rs, but I think @nixphix is the one who claimed those.

Oops, fixed. I wish there were a way to automate updating the issue, it's getting a little unwieldy :/

I'll do:

  • library/std/src/panic.rs
  • library/std/src/ascii.rs
  • library/std/src/lib.rs
  • library/std/src/fs.rs

I've used this regex:

^\s*//[!/].*: .*(#\S+|\.html)

How do I link to the Book? E.g., here's the old line:

//! [`?` operator]: ../../book/appendix-02-operators.html

@camelid if you want to go faster I made a python script to help, there is a link to the relevant comment in the first comment. :)

About the book, you don't need to change the links, they are not intra doc ones.

Taking library/std/ffi/*.rs

I ll take library/std/src/os/raw/*.md

complete list

 library/std/src/os/raw/float.md
 library/std/src/os/raw/long.md
 library/std/src/os/raw/ulong.md
 library/std/src/os/raw/ushort.md
 library/std/src/os/raw/short.md
 library/std/src/os/raw/uchar.md
 library/std/src/os/raw/uint.md
 library/std/src/os/raw/ulonglong.md
 library/std/src/os/raw/char.md
 library/std/src/os/raw/longlong.md
 library/std/src/os/raw/double.md
 library/std/src/os/raw/int.md
 library/std/src/os/raw/schar.md

Taking library/std/src/sys/vxworks/ext/*.rs

 library/std/src/sys/vxworks/ext/process.rs
 library/std/src/sys/vxworks/ext/fs.rs

Doing library/std/src/net/*.rs

I'll take the following:

  • library/core/src/intrinsics.rs
  • library/core/src/alloc/mod.rs
  • library/core/src/alloc/global.rs
  • library/core/src/alloc/layout.rs

I'd like to work on:

  • library/alloc/src/vec.rs
  • library/alloc/src/task.rs

Working on library/std/src/sys/windows/ext/*.rs

 library/std/src/sys/windows/ext/fs.rs
 library/std/src/sys/windows/ext/process.rs
 library/std/src/sys/windows/ext/ffi.rs

I'd like to do:

  • library/std/src/error.rs
  • library/std/src/alloc.rs
  • library/std/src/env.rs

Working on library/std/src/sys/unix/ext/*.rs

 library/std/src/sys/unix/ext/fs.rs
 library/std/src/sys/unix/ext/thread.rs
 library/std/src/sys/unix/ext/process.rs
 library/std/src/sys/unix/ext/net.rs

Doing library/std/src/keyword_docs.rs

Doing library/std/src/io/*.rs. (All files may not need changes)

library/std/src/io/buffered.rs
library/std/src/io/cursor.rs
library/std/src/io/error.rs
library/std/src/io/impls.rs
library/std/src/io/lazy.rs
library/std/src/io/mod.rs
library/std/src/io/prelude.rs
library/std/src/io/stdio.rs
library/std/src/io/util.rs

I will work on the rest of alloc

@jyn514 By the way, the list shows that core::option and std::process are in progress, but my PRs for those were already merged.

@camelid should be fixed now. Let me know if there's any others I missed.

I'll do library/std/src/thread/{local, mod}.rs.

I'll take core::ops::*

Claiming library/core/src/str/pattern.rs then.

I'll take:

  • library/std/src/macros.rs
  • library/std/src/collections/mod.rs
  • library/std/src/os/illumos/fs.rs
  • library/std/src/os/openbsd/fs.rs

I'll take:

  • library/core/src/sync/atomic.rs
  • library/core/src/panic.rs
  • library/core/src/iter/traits/iterator.rs
  • library/core/src/clone.rs

I'll continue with std::sync::*

I'll work on library/core/src/num/mod.rs.

I'll work on

  • library/core/src/raw.rs
  • library/core/src/ffi.rs
  • library/core/src/pin.rs
  • library/proc_macro/lib.rs

I'll also do:

  • library/core/src/char/mod.rs
  • library/core/src/macros/mod.rs
  • library/core/src/fmt/mod.rs

I'll work on:

  • library/std/src/primitive_docs.rs
  • library/std/src/sys/wasi/ext/fs.rs
  • library/std/src/sys_common/os_str_bytes.rs
  • library/std/src/sys_common/poison.rs

@jyn514 It looks like library/std/src/os/*/fs.rs were already completed in #75395, so you can mark these as done:

  • library/std/src/os/illumos/fs.rs
  • library/std/src/os/openbsd/fs.rs

I'll take (many of these are relatively small):

  • [x] library/core/src/mem/mod.rs
  • [x] library/core/src/future/future.rs
  • [x] library/core/src/ptr/mod.rs
  • [x] library/core/src/marker.rs
  • [x] library/core/src/num/dec2flt/mod.rs
  • [x] library/core/src/array/mod.rs
  • [x] library/core/src/hash/mod.rs
  • [x] library/core/src/array/iter.rs (has no links that can be converted to intra-doc)
  • [x] library/core/src/macros/* (there was a bit more to do after #75819)

Also, can library/core/src/macros/panic.md really be switched over to intra-doc links since it's MarkDown?

UPDATE (9/16/2020): All done!

I don't think you can link to arrays, right?

I updated the fs.rs files.

Also, can library/core/src/macros/panic.md really be switched over to intra-doc links since it's MarkDown?

No, good catch. That one should be left as-is, I removed it from the tracking issue.

I don't think you can link to arrays, right?

Correct, see #63351.

@jyn514 It seems that MarkDown files were converted to use intra-doc links in #75530. Maybe we can switch to intra-doc in library/core/src/macros/panic.md?

@jyn514 It seems that MarkDown files were converted to use intra-doc links in #75530. Maybe we _can_ switch to intra-doc in library/core/src/macros/panic.md?

Looking at those files it looks like they're documented with doc(include = file.md). So rustdoc doesn't seem them as markdown files, just part of the code: https://github.com/rust-lang/rust/blob/84539eb7b5de1b15467c591dcfb272fefa488bc8/library/std/src/os/raw/mod.rs#L11

If you can get rustdoc to create the links for markdown files, I think it's fine to convert them too, but I'd want to make sure the pass is actually being run and the links aren't silently being ignored.

I'll work on the remaining mod.rs if they are not claimed

 library/core/src/convert/mod.rs
 library/core/src/iter/mod.rs

FYI slice/mod.rs is 7k lines so you may want to claim that only after you've done the others.

FYI slice/mod.rs is 7k lines so you may want to claim that only after you've done the others.

sure, updated the claim

I'll do library/core/src/ptr/non_null.rs.

@jyn514 Looks like library/core/src/macros/panic.md is being included, so I opened a PR (#75927) with that. I'll make sure it's checked by hand though!

https://github.com/rust-lang/rust/blob/bf4342114e357f2934d59e12e31e94532ddb2adf/library/core/src/macros/mod.rs#L1

By the way, why is panic.md a separate file and not inline docs?

I'll do library/core/src/slice/mod.rs

Is it ok to take this? Or anyone trying to do it now?

Feel free to take it, but be warned that it's 7k lines. So if you want to do only a partial fix that's perfectly fine.

Ok thanks

@jyn514 By the way, these have been merged, so you can mark them as complete:

  • library/core/src/future/future.rs
  • library/core/src/num/dec2flt/mod.rs
  • library/core/src/array/iter.rs

I'll take library/std/src/net/ip.rs and library/std/src/fs.rs (not currently tracked)

Updated regex, ignoring primitives that can't be linked to, documentation that's not code, and files that have already been claimed:

rg '\[.*\]: \.\./.*' library/ | rg -v '\.\./(book|reference|nomicon|(std/|)primitive.(fn|slice|pointer|never).html)' | rg -v 'core/src/(mem|num|ptr|str)/mod.rs|core/src/marker.rs'

If you're working on core you can also add | rg -v 'struct.(Box|String|Vec|VecDeque|HashMap|HashSet).html', which ignores structs in alloc that can't be linked to.

@jyn514 I think you probably want some backslashes before your dots to only match dots instead of matching anything, right?

For the .rs and .html you mean? In theory yes but in practice I didn't see any false positives.

@camelid I think library/core/src/mem/mod.rs is the last file that's not blocked :)

Okay, I'll see if I have time to split it up tomorrow. If I can't after tomorrow, someone else can do it if they want to.

I can take it @camelid if you don't have the time.

I opened the PR!

I think there are actually a bunch more links to transition. List generated with:

grep '\[.*\]: (trait|struct|enum|fn)\..*\.html*' -r library | awk -F: '{print $1}' | uniq | sort | sed 's/^/- /'
  • [x] library/alloc/src/collections/binary_heap.rs
  • [x] library/alloc/src/collections/btree/map.rs
  • [x] library/alloc/src/collections/linked_list.rs
  • [x] library/alloc/src/collections/vec_deque.rs
  • [x] library/alloc/src/collections/vec_deque/drain.rs
  • [x] library/core/src/ascii.rs
  • [x] library/core/src/future/pending.rs
  • [x] library/core/src/future/poll_fn.rs
  • [x] library/core/src/future/ready.rs
  • [ ] library/core/src/iter/adapters/flatten.rs
  • [ ] library/core/src/iter/adapters/mod.rs
  • [x] library/core/src/iter/sources.rs
  • [x] library/core/src/iter/traits/collect.rs
  • [x] library/core/src/iter/traits/double_ended.rs
  • [x] library/core/src/iter/traits/exact_size.rs
  • [x] library/core/src/option.rs
  • [x] library/core/src/str/mod.rs
  • [x] library/core/src/str/pattern.rs
  • [x] library/core/src/task/wake.rs
  • [x] library/std/src/collections/hash/map.rs
  • [x] library/std/src/sync/barrier.rs
  • [ ] library/std/src/sync/once.rs
  • [x] library/stdarch/crates/core_arch/src/x86/sse42.rs

EDIT (9/17/2020): Updated list with latest commit on master (f3c923a13a4).

EDIT (10/11/2020): Updated list with latest commit on master (06a079c43ef).

@camelid does that take into account that you can't link from core or alloc to std?

@jyn514 The command should only list files that are the trait.Iterator.html form, so the list should only include local items. Here's the full grep output:

library/alloc/src/collections/linked_list.rs:/// [`into_iter`]: struct.LinkedList.html#method.into_iter
library/alloc/src/collections/binary_heap.rs://! [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/binary_heap.rs:/// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
library/alloc/src/collections/binary_heap.rs:/// [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/binary_heap.rs:/// [`iter`]: struct.BinaryHeap.html#method.iter
library/alloc/src/collections/binary_heap.rs:/// [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/binary_heap.rs:/// [`into_iter`]: struct.BinaryHeap.html#method.into_iter
library/alloc/src/collections/binary_heap.rs:/// [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/binary_heap.rs:/// [`drain`]: struct.BinaryHeap.html#method.drain
library/alloc/src/collections/binary_heap.rs:/// [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/binary_heap.rs:/// [`drain_sorted`]: struct.BinaryHeap.html#method.drain_sorted
library/alloc/src/collections/binary_heap.rs:/// [`BinaryHeap`]: struct.BinaryHeap.html
library/alloc/src/collections/vec_deque/drain.rs:/// [`drain`]: struct.VecDeque.html#method.drain
library/alloc/src/collections/vec_deque/drain.rs:/// [`VecDeque`]: struct.VecDeque.html
library/alloc/src/collections/btree/map.rs:/// [`Entry`]: enum.Entry.html
library/alloc/src/collections/btree/map.rs:/// [`Entry`]: enum.Entry.html
library/alloc/src/collections/vec_deque.rs:/// [`iter`]: struct.VecDeque.html#method.iter
library/alloc/src/collections/vec_deque.rs:/// [`VecDeque`]: struct.VecDeque.html
library/alloc/src/collections/vec_deque.rs:/// [`iter_mut`]: struct.VecDeque.html#method.iter_mut
library/alloc/src/collections/vec_deque.rs:/// [`VecDeque`]: struct.VecDeque.html
library/alloc/src/collections/vec_deque.rs:/// [`into_iter`]: struct.VecDeque.html#method.into_iter
library/alloc/src/collections/vec_deque.rs:/// [`VecDeque`]: struct.VecDeque.html
library/core/src/ascii.rs://! [`escape_default`]: fn.escape_default.html
library/core/src/ascii.rs:/// [`escape_default`]: fn.escape_default.html
library/core/src/iter/traits/exact_size.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/traits/exact_size.rs:/// [`size_hint`]: trait.Iterator.html#method.size_hint
library/core/src/iter/traits/exact_size.rs:    /// [trait-level]: trait.ExactSizeIterator.html
library/core/src/iter/traits/exact_size.rs:    /// [`size_hint`]: trait.Iterator.html#method.size_hint
library/core/src/iter/traits/double_ended.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/traits/double_ended.rs:    /// [trait-level]: trait.DoubleEndedIterator.html
library/core/src/iter/traits/collect.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/traits/collect.rs:/// [`collect`]: trait.Iterator.html#method.collect
library/core/src/iter/traits/collect.rs:/// [`IntoIterator`]: trait.IntoIterator.html
library/core/src/iter/traits/collect.rs:/// [`FromIterator`]: trait.FromIterator.html
library/core/src/iter/traits/collect.rs:    /// [trait-level]: trait.Extend.html
library/core/src/iter/adapters/flatten.rs:/// [`flatten`]: trait.Iterator.html#method.flatten
library/core/src/iter/adapters/flatten.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:    /// [`next()`]: trait.Iterator.html#method.next
library/core/src/iter/adapters/mod.rs:/// [`rev`]: trait.Iterator.html#method.rev
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`copied`]: trait.Iterator.html#method.copied
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`cloned`]: trait.Iterator.html#method.cloned
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`cycle`]: trait.Iterator.html#method.cycle
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`step_by`]: trait.Iterator.html#method.step_by
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`map`]: trait.Iterator.html#method.map
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`DoubleEndedIterator`]: trait.DoubleEndedIterator.html
library/core/src/iter/adapters/mod.rs:/// [`filter`]: trait.Iterator.html#method.filter
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`filter_map`]: trait.Iterator.html#method.filter_map
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`enumerate`]: trait.Iterator.html#method.enumerate
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`peekable`]: trait.Iterator.html#method.peekable
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:    /// [`next`]: trait.Iterator.html#tymethod.next
library/core/src/iter/adapters/mod.rs:/// [`skip_while`]: trait.Iterator.html#method.skip_while
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`take_while`]: trait.Iterator.html#method.take_while
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`map_while`]: trait.Iterator.html#method.map_while
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`skip`]: trait.Iterator.html#method.skip
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`take`]: trait.Iterator.html#method.take
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`scan`]: trait.Iterator.html#method.scan
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/adapters/mod.rs:/// [`inspect`]: trait.Iterator.html#method.inspect
library/core/src/iter/adapters/mod.rs:/// [`Iterator`]: trait.Iterator.html
library/core/src/iter/sources.rs:/// [`repeat`]: fn.repeat.html
library/core/src/iter/sources.rs:/// [`take`]: trait.Iterator.html#method.take
library/core/src/iter/sources.rs:/// [`repeat_with`]: fn.repeat_with.html
library/core/src/iter/sources.rs:/// [`repeat_with`]: fn.repeat_with.html
library/core/src/iter/sources.rs:/// [`take`]: trait.Iterator.html#method.take
library/core/src/iter/sources.rs:/// [`repeat`]: fn.repeat.html
library/core/src/iter/sources.rs:/// [`empty`]: fn.empty.html
library/core/src/iter/sources.rs:/// [`once`]: fn.once.html
library/core/src/iter/sources.rs:/// [`chain`]: trait.Iterator.html#method.chain
library/core/src/iter/sources.rs:/// [`once_with`]: fn.once_with.html
library/core/src/iter/sources.rs:/// [`once`]: fn.once.html
library/core/src/iter/sources.rs:/// [`chain`]: trait.Iterator.html#method.chain
library/core/src/iter/sources.rs:/// [`FusedIterator`]: trait.FusedIterator.html
library/core/src/iter/sources.rs:/// [`Iterator::size_hint`]: trait.Iterator.html#method.size_hint
library/core/src/iter/sources.rs:/// [`iter::from_fn`]: fn.from_fn.html
library/core/src/iter/sources.rs:/// [`successors`]: fn.successors.html
library/core/src/option.rs:/// [`Option::into_iter`]: enum.Option.html#method.into_iter
library/core/src/task/wake.rs:/// [`Waker`]: struct.Waker.html
library/core/src/task/wake.rs:/// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`Waker`]: struct.Waker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`Waker`]: struct.Waker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`Waker`]: struct.Waker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`Waker`]: struct.Waker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:/// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`RawWaker`]: struct.RawWaker.html
library/core/src/task/wake.rs:    /// [`RawWakerVTable`]: struct.RawWakerVTable.html
library/core/src/future/pending.rs:/// [`pending`]: fn.pending.html
library/core/src/future/poll_fn.rs:/// [`poll_fn`]: fn.poll_fn.html
library/core/src/future/ready.rs:/// [`ready`]: fn.ready.html
library/core/src/str/pattern.rs://! [pattern-impls]: trait.Pattern.html#implementors
library/core/src/str/mod.rs:/// [fromutf8u]: fn.from_utf8_unchecked.html
library/core/src/str/mod.rs:/// [error]: struct.Utf8Error.html
library/core/src/str/mod.rs:/// [error]: struct.Utf8Error.html
library/core/src/str/mod.rs:/// [fromutf8]: fn.from_utf8.html
library/std/src/sync/barrier.rs:/// [`wait`]: struct.Barrier.html#method.wait
library/std/src/sync/barrier.rs:/// [`Barrier`]: struct.Barrier.html
library/std/src/sync/barrier.rs:    /// [`BarrierWaitResult`]: struct.BarrierWaitResult.html
library/std/src/sync/barrier.rs:    /// [`is_leader`]: struct.BarrierWaitResult.html#method.is_leader
library/std/src/sync/barrier.rs:    /// [`wait`]: struct.Barrier.html#method.wait
library/std/src/sync/once.rs:/// [`Once::new`]: struct.Once.html#method.new
library/std/src/sync/once.rs:/// [`call_once_force`]: struct.Once.html#method.call_once_force
library/std/src/sync/once.rs:/// [`Once`]: struct.Once.html
library/std/src/sync/once.rs:/// [`Once`]: struct.Once.html
library/std/src/sync/once.rs:    /// [poison]: struct.Mutex.html#poisoning
library/std/src/sync/once.rs:    /// [`call_once`]: struct.Once.html#method.call_once
library/std/src/sync/once.rs:    /// [`OnceState`]: struct.OnceState.html
library/std/src/sync/once.rs:    /// [`call_once_force`]: struct.Once.html#method.call_once_force
library/std/src/sync/once.rs:    /// [`Once`]: struct.Once.html
library/std/src/sync/once.rs:    /// [`Once`]: struct.Once.html
library/std/src/collections/hash/map.rs:/// [`Entry`]: enum.Entry.html
library/std/src/collections/hash/map.rs:/// [`RawEntryBuilderMut`]: struct.RawEntryBuilderMut.html
library/std/src/collections/hash/map.rs:/// [`Entry`]: enum.Entry.html
library/std/src/collections/hash/map.rs:/// [`Entry`]: enum.Entry.html
library/stdarch/crates/core_arch/src/x86/sse42.rs:/// [`_mm_cmpestri`]: fn._mm_cmpestri.html
library/stdarch/crates/core_arch/src/x86/sse42.rs:/// [`_mm_cmpistri`]: fn._mm_cmpistri.html

EDIT (9/17/2020): Updated the grep output with latest commit on master (f3c923a13a4).

I think these did not show up because the command that you ran to generate the to-do list requires the link to start with ../.

Added to the tracking issue, thanks!

Taking:

library/std/src/sync/barrier.rs
library/std/src/sync/once.rs
library/core/src/future/pending.rs
library/core/src/future/poll_fn.rs
library/core/src/future/ready.rs
library/std/src/sync/barrier.rs
library/std/src/sync/once.rs

Those files now only contains links to std so they cannot be updated to use intra-doc links more than they already are.

Taking: library/core/src/iter/**

@poliorcetics I don't understand your comment - barrier.rs and once.rs are both in std, not core.

Ah no I'm mistaken on the files, sorry, I will find and note them.

I'll work on

library/std/src/collections/hash/map.rs
library/core/src/str/pattern.rs
library/core/src/option.rs
library/core/src/str/mod.rs
library/core/src/mem/mod.rs
library/core/src/ascii.rs

I'll work on

library/alloc/src/collections/binary_heap.rs
library/alloc/src/collections/btree/map.rs
library/alloc/src/collections/linked_list.rs
library/alloc/src/collections/vec_deque.rs
library/alloc/src/collections/vec_deque/drain.rs
library/core/src/task/wake.rs

library/core/src/mem/mod.rs does not need any modifications, the suggested changes for the file here are there

@jyn514 You can remove these from the list, they no longer show up with the command on the latest master commit:

  • library/core/src/iter/adapters/fuse.rs
  • library/core/src/mem/mod.rs

Taking: library/core/src/iter/**

@poliorcetics I already did those under iter/adapters/*. Sorry, I didn't saw your claim and I didn't claim, I just do.

@pickfire no worries, I'll just ignore them

In-progress

  • [ ] library/core/src/num/mod.rs (Claimed by @jyn514 in https://github.com/rust-lang/rust/issues/75080#issuecomment-678635203)

What's the status of this?

Blocked on https://github.com/rust-lang/rust/issues/75809 (well, it's not technically blocked but I don't want to mess with stringify!).

Links that can't yet be fixed

The following can be fixed or updated to be more specific after the beta release on the 27th (and #74489 is merged):

These can be fixed now! August 27th is long past and #74489 was merged a long time ago as well.

75701 has been closed for inactivity, can we work on it now or is there another PR for it ?

Sure, if you want to work on it go ahead.

Will do !

Are any of the "Unclaimed" things here actually unclaimed?

I can't find anything with [flush]: Write::flush that still uses the old links. Same with [TcpStream::read]: Read::read and [i32::MAX]. [crate::ptr] looks fixed too?

@pitaj yes

It's a little misleading because I said what they _should_ be in some cases, not what they are. But there are still links that need to be fixed.

Ah I see! Thanks for clearing that up.

I'll claim std::io::buffered and core::intrinsics

Was this page helpful?
0 / 5 - 0 ratings