mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Rollup merge of #87780 - est31:intra_doc_links, r=jyn514
alloc: Use intra doc links for the reserve function The sentence exists to highlight the existence of a performance footgun of repeated calls of the reserve_exact function.
This commit is contained in:
commit
b98c388352
@ -697,7 +697,9 @@ impl<T, A: Allocator> VecDeque<T, A> {
|
||||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: VecDeque::reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -1035,7 +1035,9 @@ impl String {
|
||||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: String::reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -811,7 +811,9 @@ impl<T, A: Allocator> Vec<T, A> {
|
||||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: Vec::reserve
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@ -875,7 +877,9 @@ impl<T, A: Allocator> Vec<T, A> {
|
||||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer `reserve` if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: Vec::reserve
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -271,7 +271,9 @@ impl OsString {
|
||||
///
|
||||
/// Note that the allocator may give the collection more space than it
|
||||
/// requests. Therefore, capacity can not be relied upon to be precisely
|
||||
/// minimal. Prefer reserve if future insertions are expected.
|
||||
/// minimal. Prefer [`reserve`] if future insertions are expected.
|
||||
///
|
||||
/// [`reserve`]: OsString::reserve
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user