@@ -210,7 +210,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
210
210
debug ! ( "num_enum_variants: {}, tested variants: {:?}, variants: {:?}" ,
211
211
num_enum_variants, values, variants) ;
212
212
let discr_ty = adt_def. repr . discr_type ( ) . to_ty ( tcx) ;
213
- let discr = self . temp ( discr_ty) ;
213
+ let discr = self . temp ( discr_ty, test . span ) ;
214
214
self . cfg . push_assign ( block, source_info, & discr,
215
215
Rvalue :: Discriminant ( lvalue. clone ( ) ) ) ;
216
216
assert_eq ! ( values. len( ) + 1 , targets. len( ) ) ;
@@ -270,7 +270,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
270
270
if let ty:: TyRef ( region, mt) = ty. sty {
271
271
if let ty:: TyArray ( _, _) = mt. ty . sty {
272
272
ty = tcx. mk_imm_ref ( region, tcx. mk_slice ( tcx. types . u8 ) ) ;
273
- let val_slice = self . temp ( ty) ;
273
+ let val_slice = self . temp ( ty, test . span ) ;
274
274
self . cfg . push_assign ( block, source_info, & val_slice,
275
275
Rvalue :: Cast ( CastKind :: Unsize , val, ty) ) ;
276
276
val = Operand :: Consume ( val_slice) ;
@@ -285,7 +285,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
285
285
value : value. clone ( )
286
286
} ) ;
287
287
288
- let slice = self . temp ( ty) ;
288
+ let slice = self . temp ( ty, test . span ) ;
289
289
self . cfg . push_assign ( block, source_info, & slice,
290
290
Rvalue :: Cast ( CastKind :: Unsize , array, ty) ) ;
291
291
Operand :: Consume ( slice)
@@ -304,7 +304,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
304
304
let ( mty, method) = self . hir . trait_method ( eq_def_id, "eq" , ty, & [ ty] ) ;
305
305
306
306
let bool_ty = self . hir . bool_ty ( ) ;
307
- let eq_result = self . temp ( bool_ty) ;
307
+ let eq_result = self . temp ( bool_ty, test . span ) ;
308
308
let eq_block = self . cfg . start_new_block ( ) ;
309
309
let cleanup = self . diverge_cleanup ( ) ;
310
310
self . cfg . terminate ( block, source_info, TerminatorKind :: Call {
@@ -349,7 +349,8 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
349
349
350
350
TestKind :: Len { len, op } => {
351
351
let ( usize_ty, bool_ty) = ( self . hir . usize_ty ( ) , self . hir . bool_ty ( ) ) ;
352
- let ( actual, result) = ( self . temp ( usize_ty) , self . temp ( bool_ty) ) ;
352
+ let ( actual, result) = ( self . temp ( usize_ty, test. span ) ,
353
+ self . temp ( bool_ty, test. span ) ) ;
353
354
354
355
// actual = len(lvalue)
355
356
self . cfg . push_assign ( block, source_info,
@@ -383,7 +384,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
383
384
left : Operand < ' tcx > ,
384
385
right : Operand < ' tcx > ) -> BasicBlock {
385
386
let bool_ty = self . hir . bool_ty ( ) ;
386
- let result = self . temp ( bool_ty) ;
387
+ let result = self . temp ( bool_ty, span ) ;
387
388
388
389
// result = op(left, right)
389
390
let source_info = self . source_info ( span) ;
0 commit comments