Skip to content

Commit a63bf3b

Browse files
Add missing urls
1 parent 2079a08 commit a63bf3b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/liballoc/vec.rs

+14-7
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,9 @@ impl<T: Clone> Vec<T> {
12121212
/// difference, with each additional slot filled with `value`.
12131213
/// If `new_len` is less than `len`, the `Vec` is simply truncated.
12141214
///
1215-
/// This method requires `Clone` to clone the passed value. If you'd
1216-
/// rather create a value with `Default` instead, see [`resize_default`].
1215+
/// This method requires [`Clone`] to be able clone the passed value. If
1216+
/// you'd rather create a value with [`Default`] instead, see
1217+
/// [`resize_default`].
12171218
///
12181219
/// # Examples
12191220
///
@@ -1227,6 +1228,8 @@ impl<T: Clone> Vec<T> {
12271228
/// assert_eq!(vec, [1, 2]);
12281229
/// ```
12291230
///
1231+
/// [`Clone`]: ../../std/clone/trait.Clone.html
1232+
/// [`Default`]: ../../std/default/trait.Default.html
12301233
/// [`resize_default`]: #method.resize_default
12311234
#[stable(feature = "vec_resize", since = "1.5.0")]
12321235
pub fn resize(&mut self, new_len: usize, value: T) {
@@ -1244,7 +1247,7 @@ impl<T: Clone> Vec<T> {
12441247
/// Iterates over the slice `other`, clones each element, and then appends
12451248
/// it to this `Vec`. The `other` vector is traversed in-order.
12461249
///
1247-
/// Note that this function is same as `extend` except that it is
1250+
/// Note that this function is same as [`extend`] except that it is
12481251
/// specialized to work with slices instead. If and when Rust gets
12491252
/// specialization this function will likely be deprecated (but still
12501253
/// available).
@@ -1256,6 +1259,8 @@ impl<T: Clone> Vec<T> {
12561259
/// vec.extend_from_slice(&[2, 3, 4]);
12571260
/// assert_eq!(vec, [1, 2, 3, 4]);
12581261
/// ```
1262+
///
1263+
/// [`extend`]: #method.extend
12591264
#[stable(feature = "vec_extend_from_slice", since = "1.6.0")]
12601265
pub fn extend_from_slice(&mut self, other: &[T]) {
12611266
self.spec_extend(other.iter())
@@ -1266,12 +1271,11 @@ impl<T: Default> Vec<T> {
12661271
/// Resizes the `Vec` in-place so that `len` is equal to `new_len`.
12671272
///
12681273
/// If `new_len` is greater than `len`, the `Vec` is extended by the
1269-
/// difference, with each additional slot filled with `Default::default()`.
1274+
/// difference, with each additional slot filled with [`Default::default()`].
12701275
/// If `new_len` is less than `len`, the `Vec` is simply truncated.
12711276
///
1272-
/// This method uses `Default` to create new values on every push. If
1273-
/// you'd rather `Clone` a given value, use [`resize`].
1274-
///
1277+
/// This method uses [`Default`] to create new values on every push. If
1278+
/// you'd rather [`Clone`] a given value, use [`resize`].
12751279
///
12761280
/// # Examples
12771281
///
@@ -1288,6 +1292,9 @@ impl<T: Default> Vec<T> {
12881292
/// ```
12891293
///
12901294
/// [`resize`]: #method.resize
1295+
/// [`Default::default()`]: ../../std/default/trait.Default.html#tymethod.default
1296+
/// [`Default`]: ../../std/default/trait.Default.html
1297+
/// [`Clone`]: ../../std/clone/trait.Clone.html
12911298
#[unstable(feature = "vec_resize_default", issue = "41758")]
12921299
pub fn resize_default(&mut self, new_len: usize) {
12931300
let len = self.len();

0 commit comments

Comments
 (0)