pub struct ItemRefContents<'tcx> {
pub def_id: DefId,
rustc_args: GenericArgsRef<'tcx>,
pub generic_args: Vec<GenericArg<'tcx>>,
pub trait_proofs: Vec<TraitProof<'tcx>>,
pub in_trait: Option<TraitProof<'tcx>>,
pub has_param: bool,
pub has_non_lt_param: bool,
}Expand description
Contents of ItemRef.
Fields§
§def_id: DefIdThe item being refered to.
rustc_args: GenericArgsRef<'tcx>Keep the original arguments. Different rustc arguments can have the same translated generics, so we must keep the args here if we want to be able to recover them.
generic_args: Vec<GenericArg<'tcx>>The generics passed to the item. If in_trait is Some, these are only the generics of
the method/type/const itself; generics for the traits are available in
in_trait.unwrap().trait.
trait_proofs: Vec<TraitProof<'tcx>>Witnesses of the trait clauses required by the item, e.g. T: Sized for Option<T> or B: ToOwned for Cow<'a, B>. Same as above, for associated items this only includes clauses
for the item itself.
in_trait: Option<TraitProof<'tcx>>If we’re referring to a trait associated item, this gives the trait clause/impl we’re referring to.
has_param: boolWhether this contains any reference to a type/lifetime/const parameter.
has_non_lt_param: boolWhether this contains any reference to a type/const parameter.
Implementations§
Trait Implementations§
Source§impl<'tcx> Clone for ItemRefContents<'tcx>
impl<'tcx> Clone for ItemRefContents<'tcx>
Source§fn clone(&self) -> ItemRefContents<'tcx>
fn clone(&self) -> ItemRefContents<'tcx>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'tcx> Debug for ItemRefContents<'tcx>
impl<'tcx> Debug for ItemRefContents<'tcx>
impl<'tcx> Eq for ItemRefContents<'tcx>
Source§impl<'tcx> Hash for ItemRefContents<'tcx>
impl<'tcx> Hash for ItemRefContents<'tcx>
Source§impl<'tcx> PartialEq for ItemRefContents<'tcx>
impl<'tcx> PartialEq for ItemRefContents<'tcx>
Source§impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ItemRefContents<'tcx>> for ItemRef<'tcx, DefId>
impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ItemRefContents<'tcx>> for ItemRef<'tcx, DefId>
fn sinto(&self, s: &S) -> ItemRefContents<'tcx>
impl<'tcx> StructuralPartialEq for ItemRefContents<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for ItemRefContents<'tcx>
impl<'tcx> !UnwindSafe for ItemRefContents<'tcx>
impl<'tcx> DynSend for ItemRefContents<'tcx>
impl<'tcx> DynSync for ItemRefContents<'tcx>
impl<'tcx> Freeze for ItemRefContents<'tcx>
impl<'tcx> Send for ItemRefContents<'tcx>
impl<'tcx> Sync for ItemRefContents<'tcx>
impl<'tcx> Unpin for ItemRefContents<'tcx>
impl<'tcx> UnsafeUnpin for ItemRefContents<'tcx>
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,
impl<T> Dedup for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> HashConsable for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more