Skip to content

Commit 0ea8bbb

Browse files
authored
Merge pull request #1703 from rpwoodbu/patch-3
Clarify array out-of-bounds behavior.
2 parents 4d1218f + 4ac14d6 commit 0ea8bbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/primitives/array.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ fn main() {
6363
}
6464
}
6565
66-
// Out of bound indexing causes compile time error.
66+
// Out of bound indexing on array causes compile time error.
6767
//println!("{}", xs[5]);
68+
// Out of bound indexing on slice causes runtime error.
69+
//println!("{}", xs[..][5]);
6870
}
6971
```

0 commit comments

Comments
 (0)