Hello #rustlang
Shouldn't Rust be able to infer the length of an array if I choose to provide the element type but not the length?
This is ok:
let a: [i32; 5] = [1, 2, 3, 4, 5];
This is also ok:
let a = [1, 2, 3, 4, 5];
Why not this?
let a: [i32: _] = [1, 2, 3, 4, 5];
-
-
Thanks for replying! Could you link to the request so I can follow the discussion?
- End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.