We have the new structure as a side thing of Place and it’s called NeoPlace, the structures were added and a lot of functions were ported by @csmoe
@spastorino completed the missing functions and fixed some bugs
Then got rid of NeoPlaceTree which was a structured that was mimicking Place but we could just use Place
/// A path to a value; something that can be evaluated without
/// changing or disturbing program state.
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
pub enum Place<'tcx> {
/// local variable
Local(Local),
/// static or static mut variable
Static(Box<Static<'tcx>>),
/// Constant code promoted to an injected static
Promoted(Box<(Promoted, Ty<'tcx>)>),
/// projection out of a place (access a field, deref a pointer, etc)
Projection(Box<PlaceProjection<'tcx>>),
}
struct Place<'tcx> {
base: PlaceBase<'tcx>,
elem: &'tcx Slice<ProjectionElem<'tcx>>,
}
enum PlaceBase<'tcx> {
/// local variable
Local(Local),
/// static or static mut variable
Static(Box<Static<'tcx>>),
/// Constant code promoted to an injected static
Promoted(Box<(Promoted, Ty<'tcx>)>),
}