Skip to content

Commit

Permalink
Auto merge of #4873 - phansch:rustup2, r=eddyb
Browse files Browse the repository at this point in the history
Rustup to rust-lang/rust#66789

changelog: none
  • Loading branch information
bors committed Dec 2, 2019
2 parents 45196ce + 474e9a1 commit 574f3fd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {

if !used_later {
let span = terminator.source_info.span;
let node = if let mir::ClearCrossCrate::Set(scope_local_data) = &mir.source_scope_local_data {
scope_local_data[terminator.source_info.scope].lint_root
} else {
unreachable!()
};
let scope = terminator.source_info.scope;
let node = mir.source_scopes[scope]
.local_data
.as_ref()
.assert_crate_local()
.lint_root;

if_chain! {
if let Some(snip) = snippet_opt(cx, span);
Expand Down

0 comments on commit 574f3fd

Please sign in to comment.