= a / 2.0; //7.5
I get error[E0277]: cannot divide {integer} by {float}
Because Rust has strong type system
That's not a problem of type inference
Rust doesnt have implicit casts. Try let a =15.0;
let b = a as f32 / 2.0;
Обсуждают сегодня