rust conver integer to float code example Example: how to convert int to float in rust let y = x as f32;