pub enum PlaceId {
Local(usize),
Field {
base: Box<PlaceId>,
field_idx: usize,
},
}Expand description
Place identifier supporting field-sensitive analysis
Variants§
Implementations§
Source§impl PlaceId
impl PlaceId
Sourcepub fn root_local(&self) -> usize
pub fn root_local(&self) -> usize
Get the root local of this place
Sourcepub fn project_field(&self, field_idx: usize) -> PlaceId
pub fn project_field(&self, field_idx: usize) -> PlaceId
Create a field projection
Sourcepub fn has_prefix(&self, prefix: &PlaceId) -> bool
pub fn has_prefix(&self, prefix: &PlaceId) -> bool
Check if this place has the given place as a prefix e.g., _1.0.1 has prefix _1, _1.0.1 has prefix _1.0, but not _2
Trait Implementations§
impl Eq for PlaceId
impl StructuralPartialEq for PlaceId
Auto Trait Implementations§
impl Freeze for PlaceId
impl RefUnwindSafe for PlaceId
impl Send for PlaceId
impl Sync for PlaceId
impl Unpin for PlaceId
impl UnwindSafe for PlaceId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.