pub struct Pos {
pub file: usize,
pub offset: usize,
}
Expand description
A source position.
Fields§
§file: usize
This source position’s file.
Indexes into Lexer::filenames
early in the compiler pipeline, and
later into TypeEnv::filenames
once we get into semantic analysis.
offset: usize
This source position’s byte offset in the file.
Implementations§
Trait Implementations§
Source§impl Ord for Pos
impl Ord for Pos
Source§impl PartialOrd for Pos
impl PartialOrd for Pos
impl Copy for Pos
impl Eq for Pos
impl StructuralPartialEq for Pos
Auto Trait Implementations§
impl Freeze for Pos
impl RefUnwindSafe for Pos
impl Send for Pos
impl Sync for Pos
impl Unpin for Pos
impl UnwindSafe for Pos
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