about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-09-16 08:24:46 +0200
committerGitHub <noreply@github.com>2020-09-16 08:24:46 +0200
commitfd86705a202191ab4b4c34abd38bb7ff3771014a (patch)
treeca3fd045a7d33642a7a5ebee3e0d1ad129f789e2
parent73858d01c36517d602ebaa9fd6f6516048eea9fc (diff)
parent1f572b03492e7d3ce7156d00f9b44ccedf47bb50 (diff)
downloadrust-fd86705a202191ab4b4c34abd38bb7ff3771014a.tar.gz
rust-fd86705a202191ab4b4c34abd38bb7ff3771014a.zip
Rollup merge of #76062 - pickfire:patch-13, r=jyn514
Vec slice example fix style and show type elision
-rw-r--r--library/alloc/src/vec.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs
index 2580c970713..f9ee2034f31 100644
--- a/library/alloc/src/vec.rs
+++ b/library/alloc/src/vec.rs
@@ -174,7 +174,9 @@ use crate::raw_vec::RawVec;
 ///
 /// // ... and that's all!
 /// // you can also do it like this:
-/// let x : &[usize] = &v;
+/// let u: &[usize] = &v;
+/// // or like this:
+/// let u: &[_] = &v;
 /// ```
 ///
 /// In Rust, it's more common to pass slices as arguments rather than vectors