Replace as casts with type-conversion functions.

https://github.com/rust-lang-nursery/rust-clippy/wiki#cast_lossless
This commit is contained in:
Dan Gohman
2017-07-13 16:37:07 -07:00
parent af74cdf364
commit 0cacba15b9
12 changed files with 42 additions and 34 deletions

View File

@@ -28,7 +28,7 @@ struct Args {
impl Args {
fn new(bits: u16, gpr: &'static [RU], fpr_limit: usize) -> Args {
Args {
pointer_bytes: bits as u32 / 8,
pointer_bytes: u32::from(bits) / 8,
pointer_bits: bits,
pointer_type: ir::Type::int(bits).unwrap(),
gpr,