Struct cairo_lang_defs::diagnostic_utils::StableLocation
source · pub struct StableLocation {
pub module_file_id: ModuleFileId,
pub stable_ptr: SyntaxStablePtrId,
}
Expand description
A stable location of a real, concrete syntax.
Fields§
§module_file_id: ModuleFileId
§stable_ptr: SyntaxStablePtrId
Implementations§
source§impl StableLocation
impl StableLocation
pub fn new(module_file_id: ModuleFileId, stable_ptr: SyntaxStablePtrId) -> Self
pub fn from_ast<TNode: TypedSyntaxNode>( module_file_id: ModuleFileId, node: &TNode ) -> Self
sourcepub fn diagnostic_location(&self, db: &dyn DefsGroup) -> DiagnosticLocation
pub fn diagnostic_location(&self, db: &dyn DefsGroup) -> DiagnosticLocation
Returns the DiagnosticLocation that corresponds to the StableLocation.
sourcepub fn diagnostic_location_until(
&self,
db: &dyn DefsGroup,
until_stable_ptr: SyntaxStablePtrId
) -> DiagnosticLocation
pub fn diagnostic_location_until( &self, db: &dyn DefsGroup, until_stable_ptr: SyntaxStablePtrId ) -> DiagnosticLocation
Returns the DiagnosticLocation that corresponds to the StableLocation.
Trait Implementations§
source§impl Clone for StableLocation
impl Clone for StableLocation
source§fn clone(&self) -> StableLocation
fn clone(&self) -> StableLocation
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 StableLocation
impl Debug for StableLocation
source§impl Hash for StableLocation
impl Hash for StableLocation
source§impl PartialEq for StableLocation
impl PartialEq for StableLocation
source§fn eq(&self, other: &StableLocation) -> bool
fn eq(&self, other: &StableLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StableLocation
impl Eq for StableLocation
impl StructuralEq for StableLocation
impl StructuralPartialEq for StableLocation
Auto Trait Implementations§
impl RefUnwindSafe for StableLocation
impl Send for StableLocation
impl Sync for StableLocation
impl Unpin for StableLocation
impl UnwindSafe for StableLocation
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.