diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 42eae6a54b531..702d97858eb45 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -720,9 +720,9 @@ impl VecDeque { /// /// 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 [`try_reserve`] if future insertions are expected. /// - /// [`reserve`]: VecDeque::reserve + /// [`try_reserve`]: VecDeque::try_reserve /// /// # Errors /// diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 4f926d99c6dbc..b151842458d35 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1044,9 +1044,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 [`try_reserve`] if future insertions are expected. /// - /// [`reserve`]: String::reserve + /// [`try_reserve`]: String::try_reserve /// /// # Errors /// diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 88bde6e8ce481..f1b70fa280214 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -881,9 +881,9 @@ impl Vec { /// /// 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 [`try_reserve`] if future insertions are expected. /// - /// [`reserve`]: Vec::reserve + /// [`try_reserve`]: Vec::try_reserve /// /// # Errors ///