groundwork refactoring of gather_moves
This commit is contained in:
parent
89500e9341
commit
eb19cd6575
8 changed files with 494 additions and 722 deletions
|
|
@ -1243,7 +1243,7 @@ impl<'a, 'b> GraphSuccessors<'b> for Mir<'a> {
|
|||
type Iter = IntoIter<BasicBlock>;
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, Ord, PartialOrd)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
|
||||
pub struct Location {
|
||||
/// the location is within this block
|
||||
pub block: BasicBlock,
|
||||
|
|
@ -1253,3 +1253,8 @@ pub struct Location {
|
|||
pub statement_index: usize,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Location {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "{:?}[{}]", self.block, self.statement_index)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -774,9 +774,6 @@ pub enum LvalueContext<'tcx> {
|
|||
// Being borrowed
|
||||
Borrow { region: &'tcx Region, kind: BorrowKind },
|
||||
|
||||
// Being sliced -- this should be same as being borrowed, probably
|
||||
Slice { from_start: usize, from_end: usize },
|
||||
|
||||
// Used as base for another lvalue, e.g. `x` in `x.y`
|
||||
Projection,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue