pub struct Expansions { /* private fields */ }Expand description
Every macro invocation the preprocessor replaced, so that a diagnostic landing inside one can say which macro it was.
A procedural macro has exactly one span per diagnostic and no way to add a second one, so the extra context has to travel in the message text.
Implementations§
Source§impl Expansions
impl Expansions
Sourcepub fn annotate(&self, diags: &mut Diagnostics)
pub fn annotate(&self, diags: &mut Diagnostics)
Adds note: in expansion of macro 'X', defined at line N to every
diagnostic that landed inside a macro invocation.
Called once per pass, on the diagnostics that pass produced, so that no diagnostic is ever annotated twice.
Trait Implementations§
Source§impl Clone for Expansions
impl Clone for Expansions
Source§impl Debug for Expansions
impl Debug for Expansions
Auto Trait Implementations§
impl Freeze for Expansions
impl RefUnwindSafe for Expansions
impl Send for Expansions
impl Sync for Expansions
impl Unpin for Expansions
impl UnsafeUnpin for Expansions
impl UnwindSafe for Expansions
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