Closed
Description
Code
fn main() {
let x = ();
println!("{}", x[0])
}
Current output
error[E0608]: cannot index into a value of type `()`
--> src/main.rs:3:20
|
3 | println!("{}", x[0])
| ^^^^ help: to access tuple elements, use: `x.0`
Desired output
No response
Rationale and extra context
No response
Other cases
No response
Anything else?
No response