diff options
Diffstat (limited to 'tests/ui/suggestions/range-index-instead-of-colon.rs')
-rw-r--r-- | tests/ui/suggestions/range-index-instead-of-colon.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/suggestions/range-index-instead-of-colon.rs b/tests/ui/suggestions/range-index-instead-of-colon.rs new file mode 100644 index 000000000..3267527ec --- /dev/null +++ b/tests/ui/suggestions/range-index-instead-of-colon.rs @@ -0,0 +1,7 @@ +// edition:2021 + +fn main() { + &[1, 2, 3][1:2]; + //~^ ERROR: expected one of + //~| HELP: you might have meant a range expression +} |