about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2020-09-04 09:50:50 +0800
committerGitHub <noreply@github.com>2020-09-04 09:50:50 +0800
commit85146b9db7bf5de79684f8595ad49c33e436d1ae (patch)
tree481cecf0aad2213173f73efb51ebcc930bc8e576
parent4df64905ea74f9732cb1448c14f72b17d3f32abc (diff)
downloadrust-85146b9db7bf5de79684f8595ad49c33e436d1ae.tar.gz
rust-85146b9db7bf5de79684f8595ad49c33e436d1ae.zip
Add slice primitive link to vec
-rw-r--r--library/alloc/src/vec.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs
index 43a0b048b47..a132cf17dff 100644
--- a/library/alloc/src/vec.rs
+++ b/library/alloc/src/vec.rs
@@ -159,7 +159,7 @@ use crate::raw_vec::RawVec;
 /// # Slicing
 ///
 /// A `Vec` can be mutable. Slices, on the other hand, are read-only objects.
-/// To get a slice, use [`&`]. Example:
+/// To get a [slice], use [`&`]. Example:
 ///
 /// ```
 /// fn read_slice(slice: &[usize]) {
@@ -287,6 +287,7 @@ use crate::raw_vec::RawVec;
 /// [`insert`]: Vec::insert
 /// [`reserve`]: Vec::reserve
 /// [owned slice]: Box
+/// [slice]: ../../std/primitive.slice.html
 /// [`&`]: ../../std/primitive.reference.html
 #[stable(feature = "rust1", since = "1.0.0")]
 #[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")]