@@ -82,7 +82,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
82
82
let bool_ty = this. hir . bool_ty ( ) ;
83
83
84
84
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 ) ;
86
86
87
87
this. cfg . push_assign ( block, source_info, & is_min,
88
88
Rvalue :: BinaryOp ( BinOp :: Eq , arg. clone ( ) , minval) ) ;
@@ -95,7 +95,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
95
95
}
96
96
ExprKind :: Box { value, value_extents } => {
97
97
let value = this. hir . mirror ( value) ;
98
- let result = this. temp ( expr. ty ) ;
98
+ let result = this. temp ( expr. ty , expr_span ) ;
99
99
// to start, malloc some memory of suitable type (thus far, uninitialized):
100
100
this. cfg . push_assign ( block, source_info, & result, Rvalue :: Box ( value. ty ) ) ;
101
101
this. in_scope ( value_extents, block, |this| {
@@ -260,7 +260,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
260
260
let bool_ty = self . hir . bool_ty ( ) ;
261
261
if self . hir . check_overflow ( ) && op. is_checkable ( ) && ty. is_integral ( ) {
262
262
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 ) ;
264
264
265
265
self . cfg . push_assign ( block, source_info,
266
266
& result_value, Rvalue :: CheckedBinaryOp ( op,
@@ -301,7 +301,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
301
301
} ;
302
302
303
303
// Check for / 0
304
- let is_zero = self . temp ( bool_ty) ;
304
+ let is_zero = self . temp ( bool_ty, span ) ;
305
305
let zero = self . zero_literal ( span, ty) ;
306
306
self . cfg . push_assign ( block, source_info, & is_zero,
307
307
Rvalue :: BinaryOp ( BinOp :: Eq , rhs. clone ( ) , zero) ) ;
@@ -315,9 +315,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
315
315
let neg_1 = self . neg_1_literal ( span, ty) ;
316
316
let min = self . minval_literal ( span, ty) ;
317
317
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 ) ;
321
321
322
322
// this does (rhs == -1) & (lhs == MIN). It could short-circuit instead
323
323
0 commit comments