gccrs
gccrs copied to clipboard
Tuple indices are handled with their shorthand
Using index 0001 on an tuple should emit an error
I tried this code:
fn main() {
(1, (2, 3)).0001.0001;
}
I expected to see this happen: Emit an error.
error[E0609]: no field `0001` on type `Toto`
--> src/main.rs:7:18
|
7 | let _ = toto.0001.001;
| ^^^^ unknown field
Instead, this happened: The 0001 is replaced by a single 1, all leading zeroes are discarded and the code compiles correctly.
Meta
- c6c92e8ef0f2a7ce3d2914d5b9657ce67ea00ceb
This behavior has been highlighted by #2694