Closed
Description
Location
In the documentation for the following functions:
I noted some trait impls where they might want to be added (such as the Extend
trait impls on Vec
), but I'm unsure if it makes sense for the "Panics" notes to be added to them.
Summary
These should be marked with the following:
# Panics
Panics if the new capacity exceeds `isize::MAX` bytes.
as they all, in one way or another, call Vec.reserve()
, which itself will panic if the new capacity exceeds isize::MAX
bytes.
Because other functions that call Vec.reserve()
(such as Vec.push()
or Vec::with_capacity()
) are marked with this "Panics" note, not marking these could result in confusion - namely, the user might think that these functions somehow allow bypassing the isize::MAX
byte limit.
Metadata
Metadata
Assignees
Labels
Area: Documentation for any part of the project, including the compiler, standard library, and toolsCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Help is requested to fix this issue.Relevant to the library API team, which will review and decide on the PR/issue.