4 ms·
Specifically it's the ::<u8> part. It's only used when writing type parameters in an expression. let x: Vec<u8> = vec![]; // spelled Vec<u8> in "type conte
by edflsafoiewq 6y ago
Specifically it's the ::<u8> part. It's only used when writing type parameters in an expression.
let x: Vec<u8> = vec![]; // spelled Vec<u8> in "type context"
let x = Vec::<u8>::new(); // spelled Vec::<u8> in "expression context"
- scott_s 6y agoYes, and googling around for this rule is what landed me on this epic poem and test.