pub struct TypeRefSite {
pub pos: SourcePosition,
pub ori: Arc<Origin>,
pub name: ModPath,
pub canonical_scope: ModPath,
pub def_pos: SourcePosition,
pub def_ori: Arc<Origin>,
}Expand description
A textual occurrence of a type reference (e.g. Foo in let x: Foo).
Captured by the compiler when a Type::Ref carrying parse-time
position info gets dereferenced. def_pos/def_ori point at the
type Foo = … declaration site so go-to-def on a type name lands
on the typedef.
Fields§
§pos: SourcePosition§ori: Arc<Origin>§name: ModPathThe name as written in source (e.g. Result, array::Foo).
canonical_scope: ModPathCanonical scope of the typedef the reference resolved to.
def_pos: SourcePosition§def_ori: Arc<Origin>Trait Implementations§
Source§impl Clone for TypeRefSite
impl Clone for TypeRefSite
Source§fn clone(&self) -> TypeRefSite
fn clone(&self) -> TypeRefSite
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 TypeRefSite
impl RefUnwindSafe for TypeRefSite
impl Send for TypeRefSite
impl Sync for TypeRefSite
impl Unpin for TypeRefSite
impl UnsafeUnpin for TypeRefSite
impl UnwindSafe for TypeRefSite
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