@@ -2859,7 +2859,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2859
2859
let lhs_t = structurally_resolved_type ( fcx, lhs. span ,
2860
2860
fcx. expr_ty ( & * lhs) ) ;
2861
2861
2862
- if ty:: type_is_integral ( lhs_t) && ast_util:: is_shift_binop ( op) {
2862
+ if ty:: type_is_integral ( lhs_t) && ast_util:: is_shift_binop ( op. node ) {
2863
2863
// Shift is a special case: rhs must be uint, no matter what lhs is
2864
2864
check_expr ( fcx, & * * rhs) ;
2865
2865
let rhs_ty = fcx. expr_ty ( & * * rhs) ;
@@ -2887,7 +2887,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2887
2887
demand:: suptype ( fcx, expr. span , tvar, lhs_t) ;
2888
2888
check_expr_has_type ( fcx, & * * rhs, tvar) ;
2889
2889
2890
- let result_t = match op {
2890
+ let result_t = match op. node {
2891
2891
ast:: BiEq | ast:: BiNe | ast:: BiLt | ast:: BiLe | ast:: BiGe |
2892
2892
ast:: BiGt => {
2893
2893
if ty:: type_is_simd ( tcx, lhs_t) {
@@ -2898,7 +2898,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2898
2898
operation `{}` not \
2899
2899
supported for floating \
2900
2900
point SIMD vector `{}`",
2901
- ast_util:: binop_to_string( op) ,
2901
+ ast_util:: binop_to_string( op. node ) ,
2902
2902
actual)
2903
2903
} ,
2904
2904
lhs_t,
@@ -2919,7 +2919,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2919
2919
return ;
2920
2920
}
2921
2921
2922
- if op == ast:: BiOr || op == ast:: BiAnd {
2922
+ if op. node == ast:: BiOr || op. node == ast:: BiAnd {
2923
2923
// This is an error; one of the operands must have the wrong
2924
2924
// type
2925
2925
fcx. write_error ( expr. id ) ;
@@ -2928,7 +2928,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2928
2928
|actual| {
2929
2929
format ! ( "binary operation `{}` cannot be applied \
2930
2930
to type `{}`",
2931
- ast_util:: binop_to_string( op) ,
2931
+ ast_util:: binop_to_string( op. node ) ,
2932
2932
actual)
2933
2933
} ,
2934
2934
lhs_t,
@@ -2945,7 +2945,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2945
2945
operation `{}=` \
2946
2946
cannot be applied to \
2947
2947
type `{}`",
2948
- ast_util:: binop_to_string( op) ,
2948
+ ast_util:: binop_to_string( op. node ) ,
2949
2949
actual)
2950
2950
} ,
2951
2951
lhs_t,
@@ -2968,7 +2968,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2968
2968
rhs : & P < ast:: Expr > ) -> Ty < ' tcx > {
2969
2969
let tcx = fcx. ccx . tcx ;
2970
2970
let lang = & tcx. lang_items ;
2971
- let ( name, trait_did) = match op {
2971
+ let ( name, trait_did) = match op. node {
2972
2972
ast:: BiAdd => ( "add" , lang. add_trait ( ) ) ,
2973
2973
ast:: BiSub => ( "sub" , lang. sub_trait ( ) ) ,
2974
2974
ast:: BiMul => ( "mul" , lang. mul_trait ( ) ) ,
@@ -2994,10 +2994,10 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
2994
2994
trait_did, lhs_expr, Some ( rhs) , || {
2995
2995
fcx. type_error_message ( ex. span , |actual| {
2996
2996
format ! ( "binary operation `{}` cannot be applied to type `{}`" ,
2997
- ast_util:: binop_to_string( op) ,
2997
+ ast_util:: binop_to_string( op. node ) ,
2998
2998
actual)
2999
2999
} , lhs_resolved_t, None )
3000
- } , if ast_util:: is_by_value_binop ( op) { AutorefArgs :: No } else { AutorefArgs :: Yes } )
3000
+ } , if ast_util:: is_by_value_binop ( op. node ) { AutorefArgs :: No } else { AutorefArgs :: Yes } )
3001
3001
}
3002
3002
3003
3003
fn check_user_unop < ' a , ' tcx > ( fcx : & FnCtxt < ' a , ' tcx > ,
0 commit comments