pub struct Pos {
pub file: usize,
pub offset: usize,
pub line: usize,
pub col: 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.
line: usize
This source position’s line number in the file.
col: usize
This source position’s column number 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)