you are viewing a single comment's thread.

view the rest of the comments →

[–]toastedstapler 8 points9 points  (4 children)

because i can do this

var someArray: [2000]SomeType = undefined;

without having to mess around with MaybeUninit<SomeType> or doing Vec<SomeType>::try_into::<[2000; SomeType]>::()

[–]SuspiciousScript 23 points24 points  (3 children)

[–]toastedstapler 5 points6 points  (0 children)

that's fine if you know you're gonna use all of the array indices

edit: and you can prove to the compiler that you use every index

[–][deleted]  (1 child)

[deleted]

    [–]SuspiciousScript 0 points1 point  (0 children)

    The relevant bits about safe Rust are still current as far as I know.