1
Fork 0

Auto merge of #85290 - Amanieu:asm_const_int, r=nagisa

Remove support for floating-point constants in asm!

Floating-point constants aren't very useful anyways and this simplifies
the code since the type check can now be done in typeck.

cc `@rust-lang/wg-inline-asm`

r? `@nagisa`
This commit is contained in:
bors 2021-05-16 17:52:52 +00:00
commit 7dc9ff5c62
8 changed files with 70 additions and 91 deletions

View file

@ -219,8 +219,6 @@ pub fn asm_const_to_str<'tcx>(
ty::IntTy::I128 => (value as i128).to_string(),
ty::IntTy::Isize => unreachable!(),
},
ty::Float(ty::FloatTy::F32) => f32::from_bits(value as u32).to_string(),
ty::Float(ty::FloatTy::F64) => f64::from_bits(value as u64).to_string(),
_ => span_bug!(sp, "asm const has bad type {}", ty_and_layout.ty),
}
}