From 3f6f39273038eb58a0e2e49983de267571eec437 Mon Sep 17 00:00:00 2001 From: lzutao Date: Thu, 23 Apr 2020 09:02:26 +0700 Subject: [PATCH] `predecessors_for` will be removed soon Co-Authored-By: ecstatic-morse --- clippy_lints/src/redundant_clone.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs index 45bb5431044..a0e2c3c486a 100644 --- a/clippy_lints/src/redundant_clone.rs +++ b/clippy_lints/src/redundant_clone.rs @@ -145,7 +145,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.predecessors()[bb]; if ps.len() != 1 { continue; }