Closed
Description
fn main() {
let a = (1, 2, 3);
println!("{}", a.1lolololol);
}
Expected:
ERROR: tuple index with a suffix is invalid
Got:
Output: 2\n
All thanks to: https://linuxrocks.online/@carl/101569506337640753
UPD:
The same error arises with tuple struct:
struct X(i32,i32,i32);
fn main() {
let a = X(1, 2, 3);
let b = a.1lolololol;
println!("{}", b);
}
Expected:
ERROR: tuple index with a suffix is invalid
Got:
Output: 2\n