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];
-
-
Replying to @kaptenadhoc
There is an open request for this! It *can*, the question is if it *should*.
1 reply 0 retweets 11 likes -
Replying to @rustlang
Thanks for replying! Could you link to the request so I can follow the discussion?
1 reply 0 retweets 0 likes
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.