1
Fork 0

Remove a span from hir::ExprKind::MethodCall

This commit is contained in:
Cameron Steffen 2021-12-01 11:17:50 -06:00
parent ec00cf80a3
commit 82f613ee3b
91 changed files with 162 additions and 168 deletions

View file

@ -23,8 +23,8 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, call_name: &str,
// allow the `as_ref` or `as_mut` if it is followed by another method call
if_chain! {
if let Some(parent) = get_parent_expr(cx, expr);
if let hir::ExprKind::MethodCall(_, ref span, _, _) = parent.kind;
if span != &expr.span;
if let hir::ExprKind::MethodCall(segment, ..) = parent.kind;
if segment.ident.span != expr.span;
then {
return;
}