pub fn is_expr_path_def_path(
    cx: &LateContext<'_>,
    expr: &Expr<'_>,
    segments: &[&str]
) -> bool
Expand description

If the expression is a path, resolves it to a DefId and checks if it matches the given path.

Please use is_path_diagnostic_item if the target is a diagnostic item.