Open
Description
I am not sure, but I think the following program should be valid:
type X = ();
fn main() {
let ():::X = ();
}
It currently fails with
error: expected identifier, found `:`
--> /home/matklad/tmp/main.rs:4:13
|
4 | let ():::X = ();
| ^ expected identifier
because we don't try to decompose ::
token.
I am not sure what should be the behavior of
type X = ();
fn main() {
let Y:::X = ();
}
but I lean towards allowing it as well, looks like it requires only constant look-ahead to handle.
Anyway, rg ':::' --type rust
shows that we don't have a test here.
@petrochenkov what are your thoughts on this?