pub struct NameID(pub u64, pub Path);
Expand description
Anything named will get assigned a unique name ID during AST lowering in order to avoid caring about scopes once HIR has been generated. This is the type of those IDs
The associated string is only used for formatting when printing. The hash and eq methods do not use it
Tuple Fields§
§0: u64
§1: Path
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NameID
impl<'de> Deserialize<'de> for NameID
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for NameID
impl Ord for NameID
Source§impl PartialOrd for NameID
impl PartialOrd for NameID
Source§impl WithLocation for NameID
impl WithLocation for NameID
fn at(self, file_id: usize, span: &impl HasCodespan) -> Loc<Self>where
Self: Sized,
fn between( self, file_id: usize, start: &impl HasCodespan, end: &impl HasCodespan, ) -> Loc<Self>
fn between_locs<T, Y>(self, start: &Loc<T>, end: &Loc<Y>) -> Loc<Self>
fn nowhere(self) -> Loc<Self>where
Self: Sized,
impl Eq for NameID
Auto Trait Implementations§
impl Freeze for NameID
impl RefUnwindSafe for NameID
impl Send for NameID
impl Sync for NameID
impl Unpin for NameID
impl UnwindSafe for NameID
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