diff options
| author | lzutao <taolzu@gmail.com> | 2020-04-23 09:02:26 +0700 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-04-23 09:09:09 +0700 |
| commit | 3f6f39273038eb58a0e2e49983de267571eec437 (patch) | |
| tree | 788c50bc700e4d493e8875107dda32ec676ae07c | |
| parent | 9ef9b7946f881968d8a2ceb11b59dddc9200532b (diff) | |
| download | rust-3f6f39273038eb58a0e2e49983de267571eec437.tar.gz rust-3f6f39273038eb58a0e2e49983de267571eec437.zip | |
`predecessors_for` will be removed soon
Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com>
| -rw-r--r-- | clippy_lints/src/redundant_clone.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |
