ILLEGAL. The compiler prints the three error messages: the type `[{integer}]` cannot be indexed by `isize` the type `[{integer}]` cannot be indexed by `u32` the type `[{integer}]` cannot be indexed by `u64` */
()
| 4 | the type `[{integer}]` cannot be indexed by `u64` |
| 5 | */ |
| 6 | fn main() { |
| 7 | let arr = [11, 22, 33]; |
| 8 | let i: usize = 2; |
| 9 | print!("{}", arr[i]); |
| 10 | let i: isize = 2; |
| 11 | print!("{}", arr[i]); |
| 12 | let i: u32 = 2; |
| 13 | print!("{}", arr[i]); |
| 14 | let i: u64 = 2; |
| 15 | print!("{}", arr[i]); |
| 16 | } |
nothing calls this directly
no outgoing calls
no test coverage detected