@@ -82,7 +82,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
8282 let bool_ty = this. hir . bool_ty ( ) ;
8383
8484 let minval = this. minval_literal ( expr_span, expr. ty ) ;
85- let is_min = this. temp ( bool_ty) ;
85+ let is_min = this. temp ( bool_ty, expr_span ) ;
8686
8787 this. cfg . push_assign ( block, source_info, & is_min,
8888 Rvalue :: BinaryOp ( BinOp :: Eq , arg. clone ( ) , minval) ) ;
@@ -95,7 +95,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
9595 }
9696 ExprKind :: Box { value, value_extents } => {
9797 let value = this. hir . mirror ( value) ;
98- let result = this. temp ( expr. ty ) ;
98+ let result = this. temp ( expr. ty , expr_span ) ;
9999 // to start, malloc some memory of suitable type (thus far, uninitialized):
100100 this. cfg . push_assign ( block, source_info, & result, Rvalue :: Box ( value. ty ) ) ;
101101 this. in_scope ( value_extents, block, |this| {
@@ -260,7 +260,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
260260 let bool_ty = self . hir . bool_ty ( ) ;
261261 if self . hir . check_overflow ( ) && op. is_checkable ( ) && ty. is_integral ( ) {
262262 let result_tup = self . hir . tcx ( ) . intern_tup ( & [ ty, bool_ty] , false ) ;
263- let result_value = self . temp ( result_tup) ;
263+ let result_value = self . temp ( result_tup, span ) ;
264264
265265 self . cfg . push_assign ( block, source_info,
266266 & result_value, Rvalue :: CheckedBinaryOp ( op,
@@ -301,7 +301,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
301301 } ;
302302
303303 // Check for / 0
304- let is_zero = self . temp ( bool_ty) ;
304+ let is_zero = self . temp ( bool_ty, span ) ;
305305 let zero = self . zero_literal ( span, ty) ;
306306 self . cfg . push_assign ( block, source_info, & is_zero,
307307 Rvalue :: BinaryOp ( BinOp :: Eq , rhs. clone ( ) , zero) ) ;
@@ -315,9 +315,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
315315 let neg_1 = self . neg_1_literal ( span, ty) ;
316316 let min = self . minval_literal ( span, ty) ;
317317
318- let is_neg_1 = self . temp ( bool_ty) ;
319- let is_min = self . temp ( bool_ty) ;
320- let of = self . temp ( bool_ty) ;
318+ let is_neg_1 = self . temp ( bool_ty, span ) ;
319+ let is_min = self . temp ( bool_ty, span ) ;
320+ let of = self . temp ( bool_ty, span ) ;
321321
322322 // this does (rhs == -1) & (lhs == MIN). It could short-circuit instead
323323
0 commit comments