Inline move_path_for_projection inside move_path_for
This commit is contained in:
parent
f492693982
commit
a0700d062e
1 changed files with 53 additions and 61 deletions
|
@ -101,22 +101,6 @@ impl<'b, 'a, 'gcx, 'tcx> Gatherer<'b, 'a, 'gcx, 'tcx> {
|
||||||
Err(MoveError::cannot_move_out_of(self.loc, Static))
|
Err(MoveError::cannot_move_out_of(self.loc, Static))
|
||||||
}
|
}
|
||||||
Place::Projection(ref proj) => {
|
Place::Projection(ref proj) => {
|
||||||
self.move_path_for_projection(place, proj)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn create_move_path(&mut self, place: &Place<'tcx>) {
|
|
||||||
// This is an non-moving access (such as an overwrite or
|
|
||||||
// drop), so this not being a valid move path is OK.
|
|
||||||
let _ = self.move_path_for(place);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn move_path_for_projection(&mut self,
|
|
||||||
place: &Place<'tcx>,
|
|
||||||
proj: &Projection<'tcx>)
|
|
||||||
-> Result<MovePathIndex, MoveError<'tcx>>
|
|
||||||
{
|
|
||||||
let base = self.move_path_for(&proj.base)?;
|
let base = self.move_path_for(&proj.base)?;
|
||||||
let mir = self.builder.mir;
|
let mir = self.builder.mir;
|
||||||
let tcx = self.builder.tcx;
|
let tcx = self.builder.tcx;
|
||||||
|
@ -171,6 +155,14 @@ impl<'b, 'a, 'gcx, 'tcx> Gatherer<'b, 'a, 'gcx, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn create_move_path(&mut self, place: &Place<'tcx>) {
|
||||||
|
// This is an non-moving access (such as an overwrite or
|
||||||
|
// drop), so this not being a valid move path is OK.
|
||||||
|
let _ = self.move_path_for(place);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'gcx, 'tcx> MoveDataBuilder<'a, 'gcx, 'tcx> {
|
impl<'a, 'gcx, 'tcx> MoveDataBuilder<'a, 'gcx, 'tcx> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue