#[non_exhaustive]pub struct DiagnosticSpanMacroExpansion {
pub span: DiagnosticSpan,
pub macro_decl_name: String,
pub def_site_span: Option<DiagnosticSpan>,
}
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
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: String
name of macro that was applied (e.g., “foo!” or “#[derive(Eq)]”)
def_site_span: Option<DiagnosticSpan>
span where macro was defined (if known)
Trait Implementations§
source§impl Clone for DiagnosticSpanMacroExpansion
impl Clone for DiagnosticSpanMacroExpansion
source§fn clone(&self) -> DiagnosticSpanMacroExpansion
fn clone(&self) -> DiagnosticSpanMacroExpansion
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 Debug for DiagnosticSpanMacroExpansion
impl Debug for DiagnosticSpanMacroExpansion
source§impl<'de> Deserialize<'de> for DiagnosticSpanMacroExpansion
impl<'de> Deserialize<'de> for DiagnosticSpanMacroExpansion
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 Hash for DiagnosticSpanMacroExpansion
impl Hash for DiagnosticSpanMacroExpansion
source§impl PartialEq<DiagnosticSpanMacroExpansion> for DiagnosticSpanMacroExpansion
impl PartialEq<DiagnosticSpanMacroExpansion> for DiagnosticSpanMacroExpansion
source§fn eq(&self, other: &DiagnosticSpanMacroExpansion) -> bool
fn eq(&self, other: &DiagnosticSpanMacroExpansion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.