Skip to content

Commit 574f3fd

Browse files
committed
Auto merge of #4873 - phansch:rustup2, r=eddyb
Rustup to rust-lang/rust#66789 changelog: none
2 parents 45196ce + 474e9a1 commit 574f3fd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clippy_lints/src/redundant_clone.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,12 @@ 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
213-
} else {
214-
unreachable!()
215-
};
211+
let scope = terminator.source_info.scope;
212+
let node = mir.source_scopes[scope]
213+
.local_data
214+
.as_ref()
215+
.assert_crate_local()
216+
.lint_root;
216217

217218
if_chain! {
218219
if let Some(snip) = snippet_opt(cx, span);

0 commit comments

Comments
 (0)