about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/trpl/primitive-types.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/doc/trpl/primitive-types.md b/src/doc/trpl/primitive-types.md
index 811080cd509..e4af03869d1 100644
--- a/src/doc/trpl/primitive-types.md
+++ b/src/doc/trpl/primitive-types.md
@@ -168,6 +168,7 @@ like arrays:
 ```rust
 let a = [0, 1, 2, 3, 4];
 let middle = &a[1..4]; // A slice of a: just the elements 1, 2, and 3
+let complete = &a[..]; // A slice containing all of the elements in a
 ```
 
 Slices have type `&[T]`. We’ll talk about that `T` when we cover