@@ -368,7 +368,7 @@ impl<T> Vec<T> {
368
368
/// into a `Vec` with the [`from_raw_parts`] function, allowing
369
369
/// the destructor to perform the cleanup.
370
370
///
371
- /// [`from_raw_parts`]: #method. from_raw_parts
371
+ /// [`from_raw_parts`]: Vec:: from_raw_parts
372
372
///
373
373
/// # Examples
374
374
///
@@ -722,8 +722,8 @@ impl<T> Vec<T> {
722
722
/// assert_eq!(vec, []);
723
723
/// ```
724
724
///
725
- /// [`clear`]: #method. clear
726
- /// [`drain`]: #method. drain
725
+ /// [`clear`]: Vec:: clear
726
+ /// [`drain`]: Vec:: drain
727
727
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
728
728
pub fn truncate ( & mut self , len : usize ) {
729
729
// This is safe because:
@@ -802,7 +802,7 @@ impl<T> Vec<T> {
802
802
/// }
803
803
/// ```
804
804
///
805
- /// [`as_mut_ptr`]: #method. as_mut_ptr
805
+ /// [`as_mut_ptr`]: Vec:: as_mut_ptr
806
806
#[ stable( feature = "vec_as_ptr" , since = "1.37.0" ) ]
807
807
#[ inline]
808
808
pub fn as_ptr ( & self ) -> * const T {
@@ -858,17 +858,17 @@ impl<T> Vec<T> {
858
858
/// is done using one of the safe operations instead, such as
859
859
/// [`truncate`], [`resize`], [`extend`], or [`clear`].
860
860
///
861
- /// [`truncate`]: #method. truncate
862
- /// [`resize`]: #method. resize
861
+ /// [`truncate`]: Vec:: truncate
862
+ /// [`resize`]: Vec:: resize
863
863
/// [`extend`]: Extend::extend
864
- /// [`clear`]: #method. clear
864
+ /// [`clear`]: Vec:: clear
865
865
///
866
866
/// # Safety
867
867
///
868
868
/// - `new_len` must be less than or equal to [`capacity()`].
869
869
/// - The elements at `old_len..new_len` must be initialized.
870
870
///
871
- /// [`capacity()`]: #method. capacity
871
+ /// [`capacity()`]: Vec:: capacity
872
872
///
873
873
/// # Examples
874
874
///
@@ -1470,7 +1470,7 @@ impl<T> Vec<T> {
1470
1470
/// assert_eq!(vec, [2, 4, 8, 16]);
1471
1471
/// ```
1472
1472
///
1473
- /// [`resize`]: #method. resize
1473
+ /// [`resize`]: Vec:: resize
1474
1474
#[ stable( feature = "vec_resize_with" , since = "1.33.0" ) ]
1475
1475
pub fn resize_with < F > ( & mut self , new_len : usize , f : F )
1476
1476
where
@@ -1521,7 +1521,7 @@ impl<T> Vec<T> {
1521
1521
/// reading from a file) before marking the data as initialized using the
1522
1522
/// [`set_len`] method.
1523
1523
///
1524
- /// [`set_len`]: #method. set_len
1524
+ /// [`set_len`]: Vec:: set_len
1525
1525
///
1526
1526
/// # Examples
1527
1527
///
@@ -1580,7 +1580,7 @@ impl<T: Clone> Vec<T> {
1580
1580
/// assert_eq!(vec, [1, 2]);
1581
1581
/// ```
1582
1582
///
1583
- /// [`resize_with`]: #method. resize_with
1583
+ /// [`resize_with`]: Vec:: resize_with
1584
1584
#[ stable( feature = "vec_resize" , since = "1.5.0" ) ]
1585
1585
pub fn resize ( & mut self , new_len : usize , value : T ) {
1586
1586
let len = self . len ( ) ;
@@ -1642,8 +1642,7 @@ impl<T: Default> Vec<T> {
1642
1642
/// assert_eq!(vec, [1, 2]);
1643
1643
/// ```
1644
1644
///
1645
- /// [`resize`]: #method.resize
1646
- /// [`Default::default()`]: Default::default
1645
+ /// [`resize`]: Vec::resize
1647
1646
#[ unstable( feature = "vec_resize_default" , issue = "41758" ) ]
1648
1647
#[ rustc_deprecated(
1649
1648
reason = "This is moving towards being removed in favor \
0 commit comments