Skip to content

Commit

Permalink
mir: remove unused float support from zero_literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jun 5, 2016
1 parent c77166c commit f158a2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_mir/build/misc.rs
Expand Up @@ -56,7 +56,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
}

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

Literal::Value { value: ConstVal::Integral(val) }
}
ty::TyFloat(_) => Literal::Value { value: ConstVal::Float(0.0) },
_ => {
span_bug!(span, "Invalid type for zero_literal: `{:?}`", ty)
}
Expand Down

0 comments on commit f158a2f

Please sign in to comment.