pub(crate) struct DeclData<'ra> {
pub(crate) kind: DeclKind<'ra>,
pub(crate) ambiguity: CmCell<Option<Interned<'ra, DeclData<'ra>>>>,
pub(crate) warn_ambiguity: CmCell<bool>,
pub(crate) expansion: LocalExpnId,
pub(crate) span: Span,
pub(crate) vis: CmCell<Visibility<DefId>>,
pub(crate) parent_module: Option<Module<'ra>>,
}Expand description
Data associated with any name declaration.
Fields§
§kind: DeclKind<'ra>§ambiguity: CmCell<Option<Interned<'ra, DeclData<'ra>>>>§warn_ambiguity: CmCell<bool>Produce a warning instead of an error when reporting ambiguities inside this binding.
May apply to indirect ambiguities under imports, so ambiguity.is_some() is not required.
expansion: LocalExpnId§span: Span§vis: CmCell<Visibility<DefId>>§parent_module: Option<Module<'ra>>Implementations§
Source§impl<'ra> DeclData<'ra>
impl<'ra> DeclData<'ra>
pub(crate) fn vis(&self) -> Visibility<DefId>
pub(crate) fn res(&self) -> Res<NodeId>
pub(crate) fn import_source(&self) -> Interned<'ra, DeclData<'ra>>
pub(crate) fn descent_to_ambiguity( self: Interned<'ra, DeclData<'ra>>, ) -> Option<(Interned<'ra, DeclData<'ra>>, Interned<'ra, DeclData<'ra>>)>
pub(crate) fn is_ambiguity_recursive(&self) -> bool
pub(crate) fn warn_ambiguity_recursive(&self) -> bool
pub(crate) fn is_possibly_imported_variant(&self) -> bool
pub(crate) fn is_extern_crate(&self) -> bool
pub(crate) fn is_import(&self) -> bool
Sourcepub(crate) fn is_import_user_facing(&self) -> bool
pub(crate) fn is_import_user_facing(&self) -> bool
The binding introduced by #[macro_export] macro_rules is a public import, but it might
not be perceived as such by users, so treat it as a non-import in some diagnostics.
pub(crate) fn is_glob_import(&self) -> bool
pub(crate) fn is_assoc_item(&self) -> bool
pub(crate) fn macro_kinds(&self) -> Option<MacroKinds>
pub(crate) fn reexport_chain( self: Interned<'ra, DeclData<'ra>>, r: &Resolver<'_, '_>, ) -> SmallVec<[Reexport; 2]>
pub(crate) fn may_appear_after( &self, invoc_parent_expansion: LocalExpnId, decl: Interned<'_, DeclData<'_>>, ) -> bool
Sourcepub(crate) fn determined(&self) -> bool
pub(crate) fn determined(&self) -> bool
Returns whether this declaration may be shadowed or overwritten by something else later.
FIXME: this function considers unexpanded_invocations, but not single_imports, so
the declaration may not be as “determined” as we think.
FIXME: relationship between this function and similar NameResolution::determined_decl
is unclear.
Trait Implementations§
Auto Trait Implementations§
impl<'ra> !DynSend for DeclData<'ra>
impl<'ra> !DynSync for DeclData<'ra>
impl<'ra> !Freeze for DeclData<'ra>
impl<'ra> !RefUnwindSafe for DeclData<'ra>
impl<'ra> !Send for DeclData<'ra>
impl<'ra> !Sync for DeclData<'ra>
impl<'ra> Unpin for DeclData<'ra>
impl<'ra> UnsafeUnpin for DeclData<'ra>
impl<'ra> !UnwindSafe for DeclData<'ra>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
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>
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>
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 moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes