Skip to content

Commit f158a2f

Browse files
committed
mir: remove unused float support from zero_literal.
1 parent c77166c commit f158a2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/build/misc.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
5656
}
5757

5858
// Returns a zero literal operand for the appropriate type, works for
59-
// bool, char, integers and floats.
59+
// bool, char and integers.
6060
pub fn zero_literal(&mut self, span: Span, ty: Ty<'tcx>) -> Operand<'tcx> {
6161
let literal = match ty.sty {
6262
ty::TyBool => {
@@ -93,7 +93,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
9393

9494
Literal::Value { value: ConstVal::Integral(val) }
9595
}
96-
ty::TyFloat(_) => Literal::Value { value: ConstVal::Float(0.0) },
9796
_ => {
9897
span_bug!(span, "Invalid type for zero_literal: `{:?}`", ty)
9998
}

0 commit comments

Comments
 (0)