Struct escargot::format::diagnostic::DiagnosticSpanMacroExpansion
source · #[non_exhaustive]pub struct DiagnosticSpanMacroExpansion<'a> {
pub span: DiagnosticSpan<'a>,
pub macro_decl_name: Cow<'a, str>,
pub def_site_span: Option<DiagnosticSpan<'a>>,
}
Expand description
Macro expansion information associated with a diagnostic.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.span: DiagnosticSpan<'a>
span where macro was applied to generate this code; note that
this may itself derive from a macro (if
span.expansion.is_some()
)
macro_decl_name: Cow<'a, str>
name of macro that was applied (e.g., “foo!” or “#[derive(Eq)]”)
def_site_span: Option<DiagnosticSpan<'a>>
span where macro was defined (if known)
Trait Implementations§
source§impl<'a> Clone for DiagnosticSpanMacroExpansion<'a>
impl<'a> Clone for DiagnosticSpanMacroExpansion<'a>
source§fn clone(&self) -> DiagnosticSpanMacroExpansion<'a>
fn clone(&self) -> DiagnosticSpanMacroExpansion<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for DiagnosticSpanMacroExpansion<'a>
impl<'a> Debug for DiagnosticSpanMacroExpansion<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for DiagnosticSpanMacroExpansion<'a>
impl<'de: 'a, 'a> Deserialize<'de> for DiagnosticSpanMacroExpansion<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> PartialEq for DiagnosticSpanMacroExpansion<'a>
impl<'a> PartialEq for DiagnosticSpanMacroExpansion<'a>
source§fn eq(&self, other: &DiagnosticSpanMacroExpansion<'a>) -> bool
fn eq(&self, other: &DiagnosticSpanMacroExpansion<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> Serialize for DiagnosticSpanMacroExpansion<'a>
impl<'a> Serialize for DiagnosticSpanMacroExpansion<'a>
impl<'a> Eq for DiagnosticSpanMacroExpansion<'a>
impl<'a> StructuralPartialEq for DiagnosticSpanMacroExpansion<'a>
Auto Trait Implementations§
impl<'a> Freeze for DiagnosticSpanMacroExpansion<'a>
impl<'a> RefUnwindSafe for DiagnosticSpanMacroExpansion<'a>
impl<'a> Send for DiagnosticSpanMacroExpansion<'a>
impl<'a> Sync for DiagnosticSpanMacroExpansion<'a>
impl<'a> Unpin for DiagnosticSpanMacroExpansion<'a>
impl<'a> UnwindSafe for DiagnosticSpanMacroExpansion<'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