Auto merge of #4875 - flip1995:rustup, r=matthiaskrgr

Rustup to rust-lang/rust#64736

cc rust-lang/rust#64736

Fixes #4872

changelog: none
This commit is contained in:
bors 2019-12-02 20:14:36 +00:00
commit 7a943a9dfc
2 changed files with 4 additions and 2 deletions

View File

@ -81,6 +81,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
) {
let def_id = cx.tcx.hir().body_owner_def_id(body.id());
let mir = cx.tcx.optimized_mir(def_id);
let mir_read_only = mir.unwrap_read_only();
let dead_unwinds = BitSet::new_empty(mir.basic_blocks().len());
let maybe_storage_live_result = do_dataflow(
@ -94,7 +95,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
);
let mut possible_borrower = {
let mut vis = PossibleBorrowerVisitor::new(cx, mir);
vis.visit_body(mir);
vis.visit_body(mir_read_only);
vis.into_map(cx, maybe_storage_live_result)
};
@ -146,7 +147,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
// `arg` is a reference as it is `.deref()`ed in the previous block.
// Look into the predecessor block and find out the source of deref.
let ps = mir.predecessors_for(bb);
let ps = mir_read_only.predecessors_for(bb);
if ps.len() != 1 {
continue;
}

View File

@ -1,6 +1,7 @@
// rustc-env:RUST_BACKTRACE=0
// normalize-stderr-test: "Clippy version: .*" -> "Clippy version: foo"
// normalize-stderr-test: "internal_lints.rs:\d*:\d*" -> "internal_lints.rs"
// normalize-stderr-test: "', .*clippy_lints" -> "', clippy_lints"
#![deny(clippy::internal)]