Skip to content

Commit

Permalink
Remove references
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jan 11, 2020
1 parent 8a3a0ea commit 2f4b105
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ fn find_stmt_assigns_to<'tcx>(

match (by_ref, &*rvalue) {
(true, mir::Rvalue::Ref(_, _, place)) | (false, mir::Rvalue::Use(mir::Operand::Copy(place))) => {
base_local_and_movability(cx, mir, place)
base_local_and_movability(cx, mir, *place)
},
(false, mir::Rvalue::Ref(_, _, place)) => {
if let [mir::ProjectionElem::Deref] = place.as_ref().projection {
base_local_and_movability(cx, mir, place)
base_local_and_movability(cx, mir, *place)
} else {
None
}
Expand All @@ -317,7 +317,7 @@ fn find_stmt_assigns_to<'tcx>(
fn base_local_and_movability<'tcx>(
cx: &LateContext<'_, 'tcx>,
mir: &mir::Body<'tcx>,
place: &mir::Place<'tcx>,
place: mir::Place<'tcx>,
) -> Option<(mir::Local, CannotMoveOut)> {
use rustc::mir::PlaceRef;

Expand Down

0 comments on commit 2f4b105

Please sign in to comment.