predecessors_for will be removed soon

Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com>
This commit is contained in:
lzutao 2020-04-23 09:02:26 +07:00 committed by Lzu Tao
parent 9ef9b7946f
commit 3f6f392730

View File

@ -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;
}