pub enum Loc {
Builtin,
CommandLine,
Implicit,
IRgen,
File(usize, usize, usize),
}
Expand description
file no, start offset, end offset (in bytes)
Variants§
Implementations§
Source§impl Loc
impl Loc
pub fn begin_range(&self) -> Self
pub fn end_range(&self) -> Self
pub fn file_no(&self) -> usize
Sourcepub fn try_file_no(&self) -> Option<usize>
pub fn try_file_no(&self) -> Option<usize>
Return the file_no if the location is in a file
pub fn start(&self) -> usize
pub fn end(&self) -> usize
pub fn use_end_from(&mut self, other: &Loc)
pub fn use_start_from(&mut self, other: &Loc)
Trait Implementations§
Source§impl Ord for Loc
impl Ord for Loc
Source§impl PartialOrd for Loc
impl PartialOrd for Loc
impl Copy for Loc
impl Eq for Loc
impl StructuralPartialEq 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 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