Skip to content

Vec::set_len docs contains dead link to extend #66354

Closed
@thanatos

Description

@thanatos

Vec::set_len currently reads:

Forces the length of the vector to new_len.

This is a low-level operation that maintains none of the normal invariants of the type. Normally changing the length of a vector is done using one of the safe operations instead, such as truncate, resize, extend, or clear.

Where extend is a link to: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.extend-1

Clicking that link does nothing, aside from setting the target in the URL bar. The target does exist, it's just hidden/not expanded when you land on the page. (If you search for "Extend implementation that copies elements out of references before pushing them onto the Vec." it's right under there.) Once you expand that, clicking the link works, but I don't think one is going to really think to do that beforehand.

This seems like exactly #52774 docs: dead link to std::vec::Vec::extend(), which was closed over a year ago. Regression?

(The other methods in the blockquoted paragraph above are links too, but I didn't feel like typing out all the Markdown for them for the purposes of this bug. They render in the docs correctly.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions