Remove references

This commit is contained in:
Yuki Okushi 2020-01-12 05:20:18 +09:00
parent 8a3a0ea2ea
commit 2f4b105863

View file

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