pub struct Origin {
pub file: FileId,
pub span: Span,
pub macro_chain: Vec<MacroUse>,
}Expand description
Where one expanded token came from.
Both halves matter: the range says where a reader should look, and the chain says which macro put it there. A diagnostic inside an expansion needs to name both. Spec §3.4.
Fields§
§file: FileIdThe file the text is in.
span: SpanWhere in that file.
macro_chain: Vec<MacroUse>The macro expansions that produced it, outermost first. Empty for a token written literally.
Implementations§
Trait Implementations§
impl Eq for Origin
impl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
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