clippy_utils

Function match_function_call

source
pub fn match_function_call<'tcx>(
    cx: &LateContext<'tcx>,
    expr: &'tcx Expr<'_>,
    path: &[&str],
) -> Option<&'tcx [Expr<'tcx>]>
Expand description

Matches a function call with the given path and returns the arguments.

Usage:

if let Some(args) = match_function_call(cx, cmp_max_call, &paths::CMP_MAX);

This function is deprecated. Use match_function_call_with_def_id.