pub struct SemanticDiagnostic {
pub stable_location: StableLocation,
pub kind: SemanticDiagnosticKind,
pub after: bool,
}
Fields§
§stable_location: StableLocation
§kind: SemanticDiagnosticKind
§after: bool
true 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
type DbType = dyn SemanticGroup
fn format(&self, db: &Self::DbType) -> String
fn location(&self, db: &Self::DbType) -> DiagnosticLocation
fn severity(&self) -> Severity
fn error_code(&self) -> Option<ErrorCode>
source§fn is_same_kind(&self, other: &Self) -> bool
fn is_same_kind(&self, other: &Self) -> bool
Returns true if the two should be regarded as the same kind when filtering duplicate
diagnostics.
fn notes(&self, _db: &Self::DbType) -> &[DiagnosticNote]
source§impl Hash for SemanticDiagnostic
impl Hash for SemanticDiagnostic
source§impl PartialEq for SemanticDiagnostic
impl PartialEq for SemanticDiagnostic
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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