Skip to content

Commit fd86705

Browse files
authored
Rollup merge of #76062 - pickfire:patch-13, r=jyn514
Vec slice example fix style and show type elision
2 parents 73858d0 + 1f572b0 commit fd86705

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/alloc/src/vec.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ use crate::raw_vec::RawVec;
174174
///
175175
/// // ... and that's all!
176176
/// // you can also do it like this:
177-
/// let x : &[usize] = &v;
177+
/// let u: &[usize] = &v;
178+
/// // or like this:
179+
/// let u: &[_] = &v;
178180
/// ```
179181
///
180182
/// In Rust, it's more common to pass slices as arguments rather than vectors

0 commit comments

Comments
 (0)