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
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 StructuralEq for SemanticDiagnostic
impl StructuralPartialEq for SemanticDiagnostic
Auto Trait Implementations§
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.