@@ -805,7 +805,7 @@ fn trans_index<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
805
805
index_expr,
806
806
method_call,
807
807
base_datum,
808
- vec! [ ( ix_datum, idx. id) ] ,
808
+ Some ( ( ix_datum, idx. id) ) ,
809
809
Some ( SaveIn ( scratch. val) ) ,
810
810
false ) ) ;
811
811
let datum = scratch. to_expr_datum ( ) ;
@@ -1175,21 +1175,21 @@ fn trans_rvalue_dps_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
1175
1175
let lhs = unpack_datum ! ( bcx, trans( bcx, & * * lhs) ) ;
1176
1176
let rhs_datum = unpack_datum ! ( bcx, trans( bcx, & * * rhs) ) ;
1177
1177
trans_overloaded_op ( bcx, expr, MethodCall :: expr ( expr. id ) , lhs,
1178
- vec ! [ ( rhs_datum, rhs. id) ] , Some ( dest) ,
1178
+ Some ( ( rhs_datum, rhs. id ) ) , Some ( dest) ,
1179
1179
!ast_util:: is_by_value_binop ( op. node ) ) . bcx
1180
1180
}
1181
1181
ast:: ExprUnary ( op, ref subexpr) => {
1182
1182
// if not overloaded, would be RvalueDatumExpr
1183
1183
let arg = unpack_datum ! ( bcx, trans( bcx, & * * subexpr) ) ;
1184
1184
trans_overloaded_op ( bcx, expr, MethodCall :: expr ( expr. id ) ,
1185
- arg, Vec :: new ( ) , Some ( dest) , !ast_util:: is_by_value_unop ( op) ) . bcx
1185
+ arg, None , Some ( dest) , !ast_util:: is_by_value_unop ( op) ) . bcx
1186
1186
}
1187
1187
ast:: ExprIndex ( ref base, ref idx) => {
1188
1188
// if not overloaded, would be RvalueDatumExpr
1189
1189
let base = unpack_datum ! ( bcx, trans( bcx, & * * base) ) ;
1190
1190
let idx_datum = unpack_datum ! ( bcx, trans( bcx, & * * idx) ) ;
1191
1191
trans_overloaded_op ( bcx, expr, MethodCall :: expr ( expr. id ) , base,
1192
- vec ! [ ( idx_datum, idx. id) ] , Some ( dest) , true ) . bcx
1192
+ Some ( ( idx_datum, idx. id ) ) , Some ( dest) , true ) . bcx
1193
1193
}
1194
1194
ast:: ExprCast ( ..) => {
1195
1195
// Trait casts used to come this way, now they should be coercions.
@@ -1943,7 +1943,7 @@ fn trans_overloaded_op<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
1943
1943
expr : & ast:: Expr ,
1944
1944
method_call : MethodCall ,
1945
1945
lhs : Datum < ' tcx , Expr > ,
1946
- rhs : Vec < ( Datum < ' tcx , Expr > , ast:: NodeId ) > ,
1946
+ rhs : Option < ( Datum < ' tcx , Expr > , ast:: NodeId ) > ,
1947
1947
dest : Option < Dest > ,
1948
1948
autoref : bool )
1949
1949
-> Result < ' blk , ' tcx > {
@@ -2259,7 +2259,7 @@ fn deref_once<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
2259
2259
let scratch = rvalue_scratch_datum ( bcx, ref_ty, "overloaded_deref" ) ;
2260
2260
2261
2261
unpack_result ! ( bcx, trans_overloaded_op( bcx, expr, method_call,
2262
- datum, Vec :: new ( ) , Some ( SaveIn ( scratch. val) ) ,
2262
+ datum, None , Some ( SaveIn ( scratch. val) ) ,
2263
2263
false ) ) ;
2264
2264
scratch. to_expr_datum ( )
2265
2265
}
0 commit comments