pub(crate) struct Message {
pub attr_span: Span,
pub message_span: Span,
pub value: String,
}Fields§
§attr_span: Span§message_span: Span§value: StringImplementations§
Source§impl Message
impl Message
pub(crate) fn new( attr_span: Span, message_span: Span, message_str: String, field_map: &IndexMap<String, (Ident, TokenStream)>, used_fields: &mut HashSet<Ident>, ) -> Self
Sourcepub(crate) fn diag_message(&self) -> TokenStream
pub(crate) fn diag_message(&self) -> TokenStream
Get the diagnostic message for this diagnostic
The passed variant is used to check whether all variables in the message are used.
For subdiagnostics, we cannot check this.
fn verify(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Send for Message
impl !Sync for Message
impl Freeze for Message
impl RefUnwindSafe for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more