pub(super) enum SubdiagnosticKind {
Label,
Note,
NoteOnce,
Help,
HelpOnce,
Warn,
Suggestion {
suggestion_kind: SuggestionKind,
applicability: Option<(Applicability, Span)>,
code_field: Ident,
code_init: TokenStream,
},
MultipartSuggestion {
suggestion_kind: SuggestionKind,
applicability: Option<(Applicability, Span)>,
},
}Expand description
Types of subdiagnostics that can be created using attributes
Variants§
Label
#[label(...)]
Note
#[note(...)]
NoteOnce
#[note_once(...)]
Help
#[help(...)]
HelpOnce
#[help_once(...)]
Warn
#[warning(...)]
Suggestion
#[suggestion{,_short,_hidden,_verbose}]
Fields
§
suggestion_kind: SuggestionKind§
applicability: Option<(Applicability, Span)>§
code_field: IdentIdentifier for variable used for formatted code, e.g. ___code_0. Enables separation
of formatting and diagnostic emission so that arg calls can happen in-between..
§
code_init: TokenStreamInitialization logic for code_field’s variable, e.g.
let __formatted_code = /* whatever */;
MultipartSuggestion
#[multipart_suggestion{,_short,_hidden,_verbose}]
Trait Implementations§
Source§impl Clone for SubdiagnosticKind
impl Clone for SubdiagnosticKind
Source§fn clone(&self) -> SubdiagnosticKind
fn clone(&self) -> SubdiagnosticKind
Returns a duplicate 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> FromIterator<&'a SubdiagnosticKind> for KindsStatistics
impl<'a> FromIterator<&'a SubdiagnosticKind> for KindsStatistics
Source§fn from_iter<T: IntoIterator<Item = &'a SubdiagnosticKind>>(kinds: T) -> Self
fn from_iter<T: IntoIterator<Item = &'a SubdiagnosticKind>>(kinds: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for SubdiagnosticKind
impl RefUnwindSafe for SubdiagnosticKind
impl !Send for SubdiagnosticKind
impl !Sync for SubdiagnosticKind
impl Unpin for SubdiagnosticKind
impl UnwindSafe for SubdiagnosticKind
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