pub struct LC<T>(pub T, pub (u32, u32, u32));
Expand description
Version of LBox that does not use a Box. This tuple struct contains a value of type T in the first position and a tuple consisting of (line, column, uid) numbers in the second position. The uid or unique identifier is a unique number placed in each LC structure created by the parser. It is useful for hashing information (such as inferred types) based on their source location. Multiple AST constructs may begin with the same line/column position, but the unique id will disambiguate them. This feature was added to Rustlr to support bumpalo-allocated ASTs.
Tuple Fields§
§0: T
§1: (u32, u32, u32)
Implementations§
Source§impl<T> LC<T>
impl<T> LC<T>
Sourcepub fn make(x: T, ln: usize, cl: usize, uid: u32) -> Self
pub fn make(x: T, ln: usize, cl: usize, uid: u32) -> Self
creates a new LC tuple struct in the form (value, (line,column,unique_id))
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LC<T>where
T: Freeze,
impl<T> RefUnwindSafe for LC<T>where
T: RefUnwindSafe,
impl<T> Send for LC<T>where
T: Send,
impl<T> Sync for LC<T>where
T: Sync,
impl<T> Unpin for LC<T>where
T: Unpin,
impl<T> UnwindSafe for LC<T>where
T: UnwindSafe,
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