pub enum MacroFault<'a> {
Undefined(&'a str),
Recursive(&'a str),
Unterminated(&'a str),
}Expand description
Which fault an expansion hit, and the first text that hit it — the
macro name for the two arms that parsed one, the copied-through
source for the arm that did not. One variant per way C sets
entry->error, so a caller cannot report a recursion as an undefined
name, nor either of them as a reference that was never closed.
Variants§
Undefined(&'a str)
No definition, no env value, no default — C’s
$(name,undefined) placeholder (macCore.c:913-928).
Recursive(&'a str)
Resolving the name re-entered itself — C’s refentry->visited
guard (macCore.c:895-904).
Unterminated(&'a str)
The closing delimiter never matched the opener, so C copied the
reference and everything after it through verbatim
(macCore.c:862-875). The payload is that copied text — this arm
carries no macro NAME because the reference never produced one.
Trait Implementations§
Source§impl<'a> Clone for MacroFault<'a>
impl<'a> Clone for MacroFault<'a>
impl<'a> Copy for MacroFault<'a>
Source§impl<'a> Debug for MacroFault<'a>
impl<'a> Debug for MacroFault<'a>
impl<'a> Eq for MacroFault<'a>
Source§impl<'a> PartialEq for MacroFault<'a>
impl<'a> PartialEq for MacroFault<'a>
impl<'a> StructuralPartialEq for MacroFault<'a>
Auto Trait Implementations§
impl<'a> Freeze for MacroFault<'a>
impl<'a> RefUnwindSafe for MacroFault<'a>
impl<'a> Send for MacroFault<'a>
impl<'a> Sync for MacroFault<'a>
impl<'a> Unpin for MacroFault<'a>
impl<'a> UnsafeUnpin for MacroFault<'a>
impl<'a> UnwindSafe for MacroFault<'a>
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