struct GenericParamDefIds {
lt: RDefId,
ty: RDefId,
ct: RDefId,
}Expand description
This is a pretty criminal hack: I want to generate ty::Generics for my fake items. This
requires DefIds for the generic parameters. rustc has an affordance for creating new DefIds
(tcx.create_def()) but I could not figure out a way to use it that didn’t end up ICEing
during metadata encoding. So instead I’m reusing the DefIds of generic parameters from core
functions.
Fields§
§lt: RDefId§ty: RDefId§ct: RDefIdImplementations§
Trait Implementations§
Source§impl Clone for GenericParamDefIds
impl Clone for GenericParamDefIds
impl Copy for GenericParamDefIds
Auto Trait Implementations§
impl DynSend for GenericParamDefIds
impl DynSync for GenericParamDefIds
impl Forget for GenericParamDefIds
impl Freeze for GenericParamDefIds
impl Move for GenericParamDefIds
impl RefUnwindSafe for GenericParamDefIds
impl Send for GenericParamDefIds
impl Sync for GenericParamDefIds
impl Unpin for GenericParamDefIds
impl UnsafeUnpin for GenericParamDefIds
impl UnwindSafe for GenericParamDefIds
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
Converts
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> ⓘ
Converts
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