pub struct SemanticDiagnostic {
pub stable_location: StableLocation,
pub kind: SemanticDiagnosticKind,
pub after: bool,
}Fields§
§stable_location: StableLocation§kind: SemanticDiagnosticKind§after: booltrue if the diagnostic should be reported after the given location. Normally false, in which case the diagnostic points to the given location (as-is).
Implementations§
source§impl SemanticDiagnostic
impl SemanticDiagnostic
sourcepub fn new(
stable_location: StableLocation,
kind: SemanticDiagnosticKind,
) -> Self
pub fn new( stable_location: StableLocation, kind: SemanticDiagnosticKind, ) -> Self
Create a diagnostic in the given location.
sourcepub fn new_after(
stable_location: StableLocation,
kind: SemanticDiagnosticKind,
) -> Self
pub fn new_after( stable_location: StableLocation, kind: SemanticDiagnosticKind, ) -> Self
Create a diagnostic in the location after the given location (with width 0).
Trait Implementations§
source§impl Clone for SemanticDiagnostic
impl Clone for SemanticDiagnostic
source§fn clone(&self) -> SemanticDiagnostic
fn clone(&self) -> SemanticDiagnostic
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 SemanticDiagnostic
impl Debug for SemanticDiagnostic
source§impl DiagnosticEntry for SemanticDiagnostic
impl DiagnosticEntry for SemanticDiagnostic
source§impl Hash for SemanticDiagnostic
impl Hash for SemanticDiagnostic
source§impl PartialEq for SemanticDiagnostic
impl PartialEq for SemanticDiagnostic
source§fn eq(&self, other: &SemanticDiagnostic) -> bool
fn eq(&self, other: &SemanticDiagnostic) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for SemanticDiagnostic
impl StructuralPartialEq for SemanticDiagnostic
Auto Trait Implementations§
impl Freeze for SemanticDiagnostic
impl RefUnwindSafe for SemanticDiagnostic
impl Send for SemanticDiagnostic
impl Sync for SemanticDiagnostic
impl Unpin for SemanticDiagnostic
impl UnwindSafe for SemanticDiagnostic
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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