#[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 for DiagnosticSpanMacroExpansion
impl PartialEq for DiagnosticSpanMacroExpansion
Source§fn eq(&self, other: &DiagnosticSpanMacroExpansion) -> bool
fn eq(&self, other: &DiagnosticSpanMacroExpansion) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Eq for DiagnosticSpanMacroExpansion
impl StructuralPartialEq for DiagnosticSpanMacroExpansion
Auto Trait Implementations§
impl Freeze for DiagnosticSpanMacroExpansion
impl RefUnwindSafe for DiagnosticSpanMacroExpansion
impl Send for DiagnosticSpanMacroExpansion
impl Sync for DiagnosticSpanMacroExpansion
impl Unpin for DiagnosticSpanMacroExpansion
impl UnwindSafe for DiagnosticSpanMacroExpansion
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