Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Sep 2, 2024
1 parent c55b39e commit 1bbd58c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/deferred_const_shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl<'tcx> LateLintPass<'tcx> for DeferredConstShadow<'tcx> {
{
for scope in self.consts.iter().rev().skip(1) {
if let Some(shadowed) = scope.get(&segment.ident.name)
&& shadowed.span != def_span
&& shadowed.ident.span != def_span
&& span_in_same_file(shadowed.span, def_span)
{
span_lint_and_then(
Expand Down Expand Up @@ -109,5 +109,5 @@ impl<'tcx> LateLintPass<'tcx> for DeferredConstShadow<'tcx> {
}

fn span_in_same_file(a: Span, b: Span) -> bool {
a.source_callsite().eq_ctxt(b.source_callsite())
a.source_callsite().eq_ctxt(b.source_callsite().clone())
}

0 comments on commit 1bbd58c

Please sign in to comment.