Skip to content

docs(output): dump_ops Result doc-link points at dead #variant.Result anchor #792

@dekobon

Description

@dekobon

Summary

The dump_ops / dump_ops_with_color doc comments declare a
reference-style intra-doc link target [Result]: #variant.Result
that points at a non-existent page anchor, producing a dead link in
the rendered rustdoc.

Location

  • src/output/dump_ops.rs:41 (and the body reference at line 14)

The identical pattern is mirrored in the two sibling dumpers:

  • src/output/dump_metrics.rs:73 (body ref at line 50)
  • src/output/dump.rs:42 (body ref at line 21)

Evidence

/// Returns a [`Result`] value, when an error occurs.
...
/// [`Result`]: #variant.Result
pub fn dump_ops(ops: &Ops) -> std::io::Result<()> {

[Result] is referenced in the body, and the trailing definition
overrides its target to the relative URL #variant.Result. Because
the definition contains a URL fragment, rustdoc treats it as an
explicit-URL link (not an intra-doc link), so cargo doc -D warnings
does not flag it — but the emitted <a href="#variant.Result">
points at an anchor that does not exist on a free function's rustdoc
page (#variant.* anchors only exist on enum pages). Clicking the
rendered Result link goes nowhere.

The intent is clearly to link the standard Result type. With the
type in scope, the bare [Result] reference already resolves to
std::result::Result via intra-doc linking; the #variant.Result
definition line is both unnecessary and actively wrong.

Expected Behavior

The Result link in the rendered docs resolves to a real target
(the std::result::Result page), or the broken explicit-URL
definition is removed so intra-doc resolution handles it.

Actual Behavior

The link points at #variant.Result, a dead in-page anchor.

Impact

Readers of the published big-code-analysis rustdoc (crates.io /
docs.rs) who click the Result link in dump_ops,
dump_ops_with_color, dump_root, dump_root_with_color, or
dump_node land on nothing. Cosmetic but user-facing on the
published API surface.


Resolution

Fixed in 7a41184: removed the three dead #variant.Result doc-link lines; intra-doc resolves bare [Result]. cargo doc clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions