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