1
Fork 0
rust/tests/ui/suggestions/range-index-instead-of-colon.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
589 B
Text
Raw Normal View History

error: expected one of `.`, `?`, `]`, or an operator, found `:`
--> $DIR/range-index-instead-of-colon.rs:4:17
|
LL | &[1, 2, 3][1:2];
| ^ expected one of `.`, `?`, `]`, or an operator
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
help: you might have meant to make a slice with range index
|
LL | &[1, 2, 3][1..2];
| ~~
help: maybe write a path separator here
|
LL | &[1, 2, 3][1::2];
| ~~
error: aborting due to previous error