rustdoc generates broken "Read more" links when the destination crate doesn't have a URL #74222
Labels
A-cross-crate-reexports
Area: Documentation that has been re-exported from a different crate
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I tried this code:
foo.rs
:bar.rs
:running
rustc foo.rs && rustdoc -L . bar.rs
so onlybar
is documented.I expected to see this happen:
When the docs for
bar
are documented the page forFooStruct
shouldn't contain any broken "Read more" links.Instead, this happened:
The "Read more" link for
foo_method
on the page forFooStruct
points to#tymethod.foo_method
which doesn't go anywhere. It should point to the documentation forFooTrait
but as that page doesn't exist the "Read more" link shouldn't exist at all. The link works fine if docs forfoo
are also generated orpub use foo::FooTrait;
is added tobar.rs
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: