pub struct LineDirective {
pub span: Span,
pub line: u32,
pub file: Option<Symbol>,
pub at: usize,
}Expand description
A #line directive, as read and as applied to the source map.
Fields§
§span: SpanWhere the directive is.
line: u32The line number the next line is to be called.
file: Option<Symbol>The file name the following lines are to be called, if one was given.
at: usizeHow many tokens had been emitted when this was read, which is where it sits in the stream.
A position is not enough to say that. A file included from here is added to the source
map after this file, so its bytes come after every byte of this one, and the token
after the #include is at a lower position than the tokens of the header. -E has to
write a marker for a #line where the directive was written rather than where its
bytes are, and this is what says where that is.
Trait Implementations§
Source§impl Clone for LineDirective
impl Clone for LineDirective
Source§fn clone(&self) -> LineDirective
fn clone(&self) -> LineDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineDirective
impl Debug for LineDirective
impl Eq for LineDirective
Source§impl PartialEq for LineDirective
impl PartialEq for LineDirective
impl StructuralPartialEq for LineDirective
Auto Trait Implementations§
impl Freeze for LineDirective
impl RefUnwindSafe for LineDirective
impl Send for LineDirective
impl Sync for LineDirective
impl Unpin for LineDirective
impl UnsafeUnpin for LineDirective
impl UnwindSafe for LineDirective
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