@@ -44,7 +44,7 @@ fn apply_reductions(cx: &LateContext<'_>, nbits: u64, expr: &Expr<'_>, signed: b
44
44
. saturating_sub ( constant_int ( cx, right) . map_or ( 0 , |s| u64:: try_from ( s) . expect ( "shift too high" ) ) ) ,
45
45
_ => nbits,
46
46
} ,
47
- ExprKind :: MethodCall ( method, [ left, right] , _) => {
47
+ ExprKind :: MethodCall ( method, left, [ right] , _) => {
48
48
if signed {
49
49
return nbits;
50
50
}
@@ -55,7 +55,7 @@ fn apply_reductions(cx: &LateContext<'_>, nbits: u64, expr: &Expr<'_>, signed: b
55
55
} ;
56
56
apply_reductions ( cx, nbits, left, signed) . min ( max_bits. unwrap_or ( u64:: max_value ( ) ) )
57
57
} ,
58
- ExprKind :: MethodCall ( method, [ _, lo, hi] , _) => {
58
+ ExprKind :: MethodCall ( method, _, [ lo, hi] , _) => {
59
59
if method. ident . as_str ( ) == "clamp" {
60
60
//FIXME: make this a diagnostic item
61
61
if let ( Some ( lo_bits) , Some ( hi_bits) ) = ( get_constant_bits ( cx, lo) , get_constant_bits ( cx, hi) ) {
@@ -64,7 +64,7 @@ fn apply_reductions(cx: &LateContext<'_>, nbits: u64, expr: &Expr<'_>, signed: b
64
64
}
65
65
nbits
66
66
} ,
67
- ExprKind :: MethodCall ( method, [ _value] , _) => {
67
+ ExprKind :: MethodCall ( method, _value, [ ] , _) => {
68
68
if method. ident . name . as_str ( ) == "signum" {
69
69
0 // do not lint if cast comes from a `signum` function
70
70
} else {
0 commit comments