Skip to content

Commit 7fc80b6

Browse files
Rollup merge of rust-lang#61926 - scottmcm:vec-vecdeque, r=Mark-Simulacrum
Fix hyperlinks in From impls between Vec and VecDeque I'd been trying to link them, but apparently actually just added brackets: <https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#impl-From%3CVec%3CT%3E%3E> ~~This reverts commit 5168f5d.~~ ~~(I'd previously tried to make relative links, but those failed linkcheck because the types are exported at different levels. So just skip the links -- they're already linked in the function signature anyway.)~~ This makes the links now work.
2 parents 21d5b8b + 38d4c1b commit 7fc80b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/liballoc/collections/vec_deque.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2721,6 +2721,9 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
27212721
impl<T> From<Vec<T>> for VecDeque<T> {
27222722
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
27232723
///
2724+
/// [`Vec<T>`]: crate::vec::Vec
2725+
/// [`VecDeque<T>`]: crate::collections::VecDeque
2726+
///
27242727
/// This avoids reallocating where possible, but the conditions for that are
27252728
/// strict, and subject to change, and so shouldn't be relied upon unless the
27262729
/// `Vec<T>` came from `From<VecDeque<T>>` and hasn't been reallocated.
@@ -2752,6 +2755,9 @@ impl<T> From<Vec<T>> for VecDeque<T> {
27522755
impl<T> From<VecDeque<T>> for Vec<T> {
27532756
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
27542757
///
2758+
/// [`Vec<T>`]: crate::vec::Vec
2759+
/// [`VecDeque<T>`]: crate::collections::VecDeque
2760+
///
27552761
/// This never needs to re-allocate, but does need to do O(n) data movement if
27562762
/// the circular buffer doesn't happen to be at the beginning of the allocation.
27572763
///

0 commit comments

Comments
 (0)