mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Remove references
This commit is contained in:
parent
8a3a0ea2ea
commit
2f4b105863
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue