mirror of https://github.com/rust-lang/reference
fix example
This commit is contained in:
parent
85f29fcd29
commit
cd4b934993
|
@ -2851,14 +2851,9 @@ Indices are zero-based, and may be of any integral type. Vector access is
|
|||
bounds-checked at run-time. When the check fails, it will put the task in a
|
||||
_failing state_.
|
||||
|
||||
```{.ignore}
|
||||
# use std::task;
|
||||
# task::spawn(proc() {
|
||||
|
||||
```{should-fail}
|
||||
([1, 2, 3, 4])[0];
|
||||
(["a", "b"])[10]; // fails
|
||||
|
||||
# })
|
||||
```
|
||||
|
||||
### Unary operator expressions
|
||||
|
|
Loading…
Reference in New Issue