Enum rustc_hir::hir::GenericParamSource
source · pub enum GenericParamSource {
Generics,
Binder,
}
Expand description
Records where the generic parameter originated from.
This can either be from an item’s generics, in which case it’s typically
early-bound (but can be a late-bound lifetime in functions, for example),
or from a for<...>
binder, in which case it’s late-bound (and notably,
does not show up in the parent item’s generics).
Variants§
Trait Implementations§
source§impl Clone for GenericParamSource
impl Clone for GenericParamSource
source§fn clone(&self) -> GenericParamSource
fn clone(&self) -> GenericParamSource
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 GenericParamSource
impl Debug for GenericParamSource
source§impl<__CTX> HashStable<__CTX> for GenericParamSourcewhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for GenericParamSourcewhere __CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
impl Copy for GenericParamSource
Auto Trait Implementations§
impl RefUnwindSafe for GenericParamSource
impl Send for GenericParamSource
impl Sync for GenericParamSource
impl Unpin for GenericParamSource
impl UnwindSafe for GenericParamSource
Blanket Implementations§
source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere T: Copy,
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter<'a>( arena: &'a Arena<'tcx>, iter: impl IntoIterator<Item = T> ) -> &'a mut [T]
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
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: 1 byte
Size for each variant:
Generics
: 0 bytesBinder
: 0 bytes