Skip to content

Commit 72c27ab

Browse files
committed
fix example
1 parent f95958b commit 72c27ab

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/doc/reference.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,14 +2851,9 @@ Indices are zero-based, and may be of any integral type. Vector access is
28512851
bounds-checked at run-time. When the check fails, it will put the task in a
28522852
_failing state_.
28532853

2854-
```{.ignore}
2855-
# use std::task;
2856-
# task::spawn(proc() {
2857-
2854+
```{should-fail}
28582855
([1, 2, 3, 4])[0];
28592856
(["a", "b"])[10]; // fails
2860-
2861-
# })
28622857
```
28632858

28642859
### Unary operator expressions

0 commit comments

Comments
 (0)