mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
inline ctxt; use eq_ctxt
This commit is contained in:
@@ -169,8 +169,7 @@ fn check_collapsible_if_if(&self, cx: &LateContext<'_>, expr: &Expr<'_>, check:
|
||||
&& cx.tcx.hir_attrs(inner.hir_id).is_empty()
|
||||
&& let ExprKind::If(check_inner, _, None) = &inner.kind
|
||||
&& self.eligible_condition(cx, check_inner)
|
||||
&& let ctxt = expr.span.ctxt()
|
||||
&& inner.span.ctxt() == ctxt
|
||||
&& expr.span.eq_ctxt(inner.span)
|
||||
&& !block_starts_with_significant_tokens(cx, then, inner, self.lint_commented_code)
|
||||
{
|
||||
span_lint_and_then(
|
||||
|
||||
Reference in New Issue
Block a user