Skip to content

Commit bb5e79c

Browse files
authored
Link vec doc to & reference
It is not always obvious that people could see the docs for `&` especially for beginners, it also helps learnability.
1 parent 1dc748f commit bb5e79c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ use crate::raw_vec::RawVec;
159159
/// # Slicing
160160
///
161161
/// A `Vec` can be mutable. Slices, on the other hand, are read-only objects.
162-
/// To get a slice, use `&`. Example:
162+
/// To get a slice, use [`&`][prim@reference]. Example:
163163
///
164164
/// ```
165165
/// fn read_slice(slice: &[usize]) {

0 commit comments

Comments
 (0)