@@ -44,7 +44,7 @@ fn apply_reductions(cx: &LateContext<'_>, nbits: u64, expr: &Expr<'_>, signed: b
4444 . saturating_sub ( constant_int ( cx, right) . map_or ( 0 , |s| u64:: try_from ( s) . expect ( "shift too high" ) ) ) ,
4545 _ => nbits,
4646 } ,
47- ExprKind :: MethodCall ( method, [ left, right] , _) => {
47+ ExprKind :: MethodCall ( method, left, [ right] , _) => {
4848 if signed {
4949 return nbits;
5050 }
@@ -55,7 +55,7 @@ fn apply_reductions(cx: &LateContext<'_>, nbits: u64, expr: &Expr<'_>, signed: b
5555 } ;
5656 apply_reductions ( cx, nbits, left, signed) . min ( max_bits. unwrap_or ( u64:: max_value ( ) ) )
5757 } ,
58- ExprKind :: MethodCall ( method, [ _, lo, hi] , _) => {
58+ ExprKind :: MethodCall ( method, _, [ lo, hi] , _) => {
5959 if method. ident . as_str ( ) == "clamp" {
6060 //FIXME: make this a diagnostic item
6161 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
6464 }
6565 nbits
6666 } ,
67- ExprKind :: MethodCall ( method, [ _value] , _) => {
67+ ExprKind :: MethodCall ( method, _value, [ ] , _) => {
6868 if method. ident . name . as_str ( ) == "signum" {
6969 0 // do not lint if cast comes from a `signum` function
7070 } else {
0 commit comments