@@ -959,7 +959,7 @@ fn report<'tcx>(
959
959
// expr_str (the suggestion) is never shown if is_final_ufcs is true, since it's
960
960
// `expr.kind == ExprKind::Call`. Therefore, this is, afaik, always unnecessary.
961
961
/*
962
- expr_str = if !expr_is_macro_call && is_final_ufcs && expr.precedence().order() < PREC_PREFIX {
962
+ expr_str = if !expr_is_macro_call && is_final_ufcs && expr.precedence() < PREC_PREFIX {
963
963
Cow::Owned(format!("({expr_str})"))
964
964
} else {
965
965
expr_str
@@ -999,7 +999,7 @@ fn report<'tcx>(
999
999
Node :: Expr ( e) => match e. kind {
1000
1000
ExprKind :: Call ( callee, _) if callee. hir_id != data. first_expr . hir_id => ( 0 , false ) ,
1001
1001
ExprKind :: Call ( ..) => ( PREC_UNAMBIGUOUS , matches ! ( expr. kind, ExprKind :: Field ( ..) ) ) ,
1002
- _ => ( e. precedence ( ) . order ( ) , false ) ,
1002
+ _ => ( e. precedence ( ) , false ) ,
1003
1003
} ,
1004
1004
_ => ( 0 , false ) ,
1005
1005
} ;
@@ -1012,7 +1012,7 @@ fn report<'tcx>(
1012
1012
) ;
1013
1013
1014
1014
let sugg = if !snip_is_macro
1015
- && ( calls_field || expr. precedence ( ) . order ( ) < precedence)
1015
+ && ( calls_field || expr. precedence ( ) < precedence)
1016
1016
&& !has_enclosing_paren ( & snip)
1017
1017
&& !is_in_tuple
1018
1018
{
@@ -1067,7 +1067,7 @@ fn report<'tcx>(
1067
1067
let ( snip, snip_is_macro) =
1068
1068
snippet_with_context ( cx, expr. span , data. first_expr . span . ctxt ( ) , ".." , & mut app) ;
1069
1069
let sugg =
1070
- if !snip_is_macro && expr. precedence ( ) . order ( ) < precedence && !has_enclosing_paren ( & snip) {
1070
+ if !snip_is_macro && expr. precedence ( ) < precedence && !has_enclosing_paren ( & snip) {
1071
1071
format ! ( "{prefix}({snip})" )
1072
1072
} else {
1073
1073
format ! ( "{prefix}{snip}" )
@@ -1154,7 +1154,7 @@ impl<'tcx> Dereferencing<'tcx> {
1154
1154
} ,
1155
1155
Some ( parent) if !parent. span . from_expansion ( ) => {
1156
1156
// Double reference might be needed at this point.
1157
- if parent. precedence ( ) . order ( ) == PREC_UNAMBIGUOUS {
1157
+ if parent. precedence ( ) == PREC_UNAMBIGUOUS {
1158
1158
// Parentheses would be needed here, don't lint.
1159
1159
* outer_pat = None ;
1160
1160
} else {
0 commit comments