Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thanatos opened this issue Nov 13, 2019 · 0 comments · Fixed by #66360
Closed

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

thanatos opened this issue Nov 13, 2019 · 0 comments · Fixed by #66360
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@thanatos
Copy link
Contributor

thanatos commented Nov 13, 2019

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.)

@JohnTitor JohnTitor added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 13, 2019
@bors bors closed this as completed in 28c0e40 Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants