pub enum RichLocation {
Location(Location),
Start,
End,
}
Expand description
Extends a MIR body’s Location
with Start
(before the first instruction) and End
(after all returns).
Variants§
Location(Location)
The point after a location in a body.
Start
The start of the body.
Note that Location::START
is different from RichLocation::Start
!
The latter is before the former in time.
End
The end of the body, after all possible return statements.
Implementations§
Source§impl RichLocation
impl RichLocation
Trait Implementations§
Source§impl Clone for RichLocation
impl Clone for RichLocation
Source§fn clone(&self) -> RichLocation
fn clone(&self) -> RichLocation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RichLocation
impl Debug for RichLocation
Source§impl<'de> Deserialize<'de> for RichLocation
impl<'de> Deserialize<'de> for RichLocation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RichLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RichLocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RichLocation
impl Display for RichLocation
Source§impl From<Location> for RichLocation
impl From<Location> for RichLocation
Source§fn from(value: Location) -> RichLocation
fn from(value: Location) -> RichLocation
Converts to this type from the input type.
Source§impl Hash for RichLocation
impl Hash for RichLocation
Source§impl PartialEq for RichLocation
impl PartialEq for RichLocation
Source§impl Serialize for RichLocation
impl Serialize for RichLocation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for RichLocation
impl Eq for RichLocation
impl StructuralPartialEq for RichLocation
Auto Trait Implementations§
impl Freeze for RichLocation
impl RefUnwindSafe for RichLocation
impl Send for RichLocation
impl Sync for RichLocation
impl Unpin for RichLocation
impl UnwindSafe for RichLocation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more