make move unwrap_binder! a move subpath
This commit is contained in:
parent
b151a5e6a2
commit
bce7f71589
2 changed files with 7 additions and 3 deletions
|
|
@ -222,6 +222,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
|
|||
_ => bug!("Unexpected type {:#?}", place_ty.is_array()),
|
||||
},
|
||||
MoveSubPath::Downcast(_) => (),
|
||||
MoveSubPath::UnwrapUnsafeBinder => (),
|
||||
};
|
||||
|
||||
move_elem
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ pub enum MoveSubPath {
|
|||
Field(FieldIdx),
|
||||
ConstantIndex(u64),
|
||||
Downcast(VariantIdx),
|
||||
UnwrapUnsafeBinder,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
|
|
@ -416,10 +417,12 @@ impl MoveSubPath {
|
|||
MoveSubPath::ConstantIndex(offset)
|
||||
}
|
||||
ProjectionKind::Downcast(_, idx) => MoveSubPath::Downcast(idx),
|
||||
ProjectionKind::UnwrapUnsafeBinder(_) => MoveSubPath::UnwrapUnsafeBinder,
|
||||
|
||||
// these should be the same move path as their parent
|
||||
// they're fine to skip because they cannot have sibling move paths
|
||||
ProjectionKind::OpaqueCast(_) | ProjectionKind::UnwrapUnsafeBinder(_) => {
|
||||
// this should be the same move path as its parent
|
||||
// its fine to skip because it cannot have sibling move paths
|
||||
// and it is not a user visible path
|
||||
ProjectionKind::OpaqueCast(_) => {
|
||||
return MoveSubPathResult::Skip;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue