Skip to content

Commit 6669c2c

Browse files
committed
1 parent 45196ce commit 6669c2c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clippy_lints/src/redundant_clone.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
208208

209209
if !used_later {
210210
let span = terminator.source_info.span;
211-
let node = if let mir::ClearCrossCrate::Set(scope_local_data) = &mir.source_scope_local_data {
212-
scope_local_data[terminator.source_info.scope].lint_root
211+
let scope = terminator.source_info.scope;
212+
let node = if let mir::ClearCrossCrate::Set(scope_local_data) = &mir.source_scopes[scope].local_data {
213+
scope_local_data.lint_root
213214
} else {
214215
unreachable!()
215216
};

0 commit comments

Comments
 (0)