@@ -73,19 +73,34 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
73
73
}
74
74
ExprKind :: Binary { op, lhs, rhs } => {
75
75
let lhs = unpack ! (
76
- block =
77
- this. as_operand( block, scope, & this. thir[ lhs] , LocalInfo :: Boring , NeedsTemporary :: Maybe )
76
+ block = this. as_operand(
77
+ block,
78
+ scope,
79
+ & this. thir[ lhs] ,
80
+ LocalInfo :: Boring ,
81
+ NeedsTemporary :: Maybe
82
+ )
78
83
) ;
79
84
let rhs = unpack ! (
80
- block =
81
- this. as_operand( block, scope, & this. thir[ rhs] , LocalInfo :: Boring , NeedsTemporary :: No )
85
+ block = this. as_operand(
86
+ block,
87
+ scope,
88
+ & this. thir[ rhs] ,
89
+ LocalInfo :: Boring ,
90
+ NeedsTemporary :: No
91
+ )
82
92
) ;
83
93
this. build_binary_op ( block, op, expr_span, expr. ty , lhs, rhs)
84
94
}
85
95
ExprKind :: Unary { op, arg } => {
86
96
let arg = unpack ! (
87
- block =
88
- this. as_operand( block, scope, & this. thir[ arg] , LocalInfo :: Boring , NeedsTemporary :: No )
97
+ block = this. as_operand(
98
+ block,
99
+ scope,
100
+ & this. thir[ arg] ,
101
+ LocalInfo :: Boring ,
102
+ NeedsTemporary :: No
103
+ )
89
104
) ;
90
105
// Check for -MIN on signed integers
91
106
if this. check_overflow && op == UnOp :: Neg && expr. ty . is_signed ( ) {
@@ -272,8 +287,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
272
287
}
273
288
ExprKind :: Pointer { cast, source } => {
274
289
let source = unpack ! (
275
- block =
276
- this. as_operand( block, scope, & this. thir[ source] , LocalInfo :: Boring , NeedsTemporary :: No )
290
+ block = this. as_operand(
291
+ block,
292
+ scope,
293
+ & this. thir[ source] ,
294
+ LocalInfo :: Boring ,
295
+ NeedsTemporary :: No
296
+ )
277
297
) ;
278
298
block. and ( Rvalue :: Cast ( CastKind :: Pointer ( cast) , source, expr. ty ) )
279
299
}
@@ -502,8 +522,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
502
522
Category :: of( & expr. kind) ,
503
523
Some ( Category :: Rvalue ( RvalueFunc :: AsRvalue ) | Category :: Constant )
504
524
) ) ;
505
- let operand =
506
- unpack ! ( block = this. as_operand( block, scope, expr, LocalInfo :: Boring , NeedsTemporary :: No ) ) ;
525
+ let operand = unpack ! (
526
+ block =
527
+ this. as_operand( block, scope, expr, LocalInfo :: Boring , NeedsTemporary :: No )
528
+ ) ;
507
529
block. and ( Rvalue :: Use ( operand) )
508
530
}
509
531
}
@@ -662,8 +684,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
662
684
// Repeating a const does nothing
663
685
} else {
664
686
// For a non-const, we may need to generate an appropriate `Drop`
665
- let value_operand =
666
- unpack ! ( block = this. as_operand( block, scope, value, LocalInfo :: Boring , NeedsTemporary :: No ) ) ;
687
+ let value_operand = unpack ! (
688
+ block = this. as_operand( block, scope, value, LocalInfo :: Boring , NeedsTemporary :: No )
689
+ ) ;
667
690
if let Operand :: Move ( to_drop) = value_operand {
668
691
let success = this. cfg . start_new_block ( ) ;
669
692
this. cfg . terminate (
0 commit comments