You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rustbook (x86_64-unknown-linux-gnu) - embedded-book
Rustbook (x86_64-unknown-linux-gnu) - edition-guide
Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.17s
alloc/string/struct.String.html:842: broken link fragment `#method.replacen` pointing to `core/primitive.str.html`
number of HTML files scanned: 32333
number of HTML redirects found: 10095
number of links checked: 2261468
number of links ignored due to external: 112628
The text was updated successfully, but these errors were encountered:
I don't think this is necessarily a rustdoc issue. Currently, the stdlib only has docs for primitive types in core and std, meaning that inherent methods on primitives that are defined in alloc (like str::replacen) are not documented in alloc (so they are not documented anywhere when building only alloc's docs).
One solution would be to also document (some) primitives in alloc, which would give a place for methods like str::replacen, str::into_string, str::into_boxed_bytes, slice::to_vec, slice::into_vec, etc to be documented without std.
Another "solution" (for the linked PR) is to hardcode the link to go to ../../std/primitive.str.html#method.replacen, so that the link will only be broken when alloc's docs are built without std (This is what I used in my rebased branch)
Another ""solution"" is to just ignore the "broken" link in alloc's docs, since the link is specifically only broken in alloc/string/struct.String.html, not std/string/struct.String.html.
Hi, in my PR #97977 I was unable to link to
str::replacen
from thealloc
crate in a docstring:rust/library/alloc/src/string.rs
Line 1747 in eb1fa3c
The text was updated successfully, but these errors were encountered: