pub struct ReferenceSite {
pub pos: SourcePosition,
pub ori: Arc<Origin>,
pub name: ModPath,
pub bind_id: BindId,
pub def_pos: SourcePosition,
pub def_ori: Arc<Origin>,
}Expand description
A textual occurrence of a name at a specific source position that
the compiler resolved to a particular BindId. Populated as a side
effect of compilation so IDE tooling can answer
textDocument/references and textDocument/definition without
re-implementing name resolution.
def_pos and def_ori mirror the bind’s declaration site at
resolution time. They’re captured here because some bindings
(notably lambda parameters) are unbound from the env when the
callsite that created them is dropped — but their declaration
site is still meaningful to the user.
Fields§
§pos: SourcePosition§ori: Arc<Origin>§name: ModPath§bind_id: BindId§def_pos: SourcePosition§def_ori: Arc<Origin>Trait Implementations§
Source§impl Clone for ReferenceSite
impl Clone for ReferenceSite
Source§fn clone(&self) -> ReferenceSite
fn clone(&self) -> ReferenceSite
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReferenceSite
impl RefUnwindSafe for ReferenceSite
impl Send for ReferenceSite
impl Sync for ReferenceSite
impl Unpin for ReferenceSite
impl UnsafeUnpin for ReferenceSite
impl UnwindSafe for ReferenceSite
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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