pub struct Loc {
pub line: u32,
pub column: u32,
}Expand description
Source location (1-based line and column) attached to select AST nodes for diagnostics.
Loc is intentionally transparent to equality and serialization: two nodes
that differ only in location compare equal, and the position is never
written to the serialized AST (the field carries #[serde(skip)]).
Fields§
§line: u32§column: u32Implementations§
Trait Implementations§
impl Copy for Loc
Auto Trait Implementations§
impl Freeze for Loc
impl RefUnwindSafe for Loc
impl Send for Loc
impl Sync for Loc
impl Unpin for Loc
impl UnsafeUnpin for Loc
impl UnwindSafe for Loc
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