Closed
Description
Given the following code:
let _ = &..;
The current output is:
error: expected expression, found `..`
--> src/main.rs:2:14
|
2 | let _ = &..;
| ^^ expected expression
..
is a valid expression (a RangeFull
literal), so this error is misleading. It should at a minimum have a suggestion to replace with the valid version &(..)
, and probably should just work. It also imho ideally shouldn't be a hard parser error blocking semantic passes; the parse of &(..)
is fairly unambiguously intended, even if we decide we should still require the parenthesis.