After a developer writes a program that declares and instantiates an Array with a "fixed length" of 4 (running rustc 1.0.0-nightly) and then builds it without receiving any warnings or errors with Cargo.
let arr_imm = [1, 2, 3, 4];
println!("last element of arr_imm is: {}", arr_imm[-1]);
Why is it that when they then run the executable program (which contains code that attempts to access element number -1 of a Rust Array) does it think it should access the Array's index number of 18446744073709551615 (even though the Rust Array has been pre-declared with a "fixed length" of 4) and give the following error when the executable is run?
error when the Rust file is run: thread '<main>' panicked at 'index out of bounds: the len is 4 but the index is 18446744073709551615'
The integer literal 18446744073709551615 is equivalent to 2^64-1, so this outcome appears to indicate that despite the executable already knowing that an Array only has a "fixed length" of 4, it will ignore this and interpret that it should always attempt to access element 18446744073709551615 for an expression requesting access to element number -1.
Does this integer literal 18446744073709551615 represent the maximum possible "length" of a Rust Array, where the "length" is of 64 bit unsigned integer literal data type?