Struct rustc_query_impl::ty::Binder [−][src]
pub struct Binder<'tcx, T>(T, &'tcx List<BoundVariableKind>);Expand description
Binder is a binder for higher-ranked lifetimes or types. It is part of the
compiler’s representation for things like for<'a> Fn(&'a isize)
(which would be represented by the type PolyTraitRef == Binder<'tcx, TraitRef>). Note that when we instantiate,
erase, or otherwise “discharge” these bound vars, we change the
type from Binder<'tcx, T> to just T (see
e.g., liberate_late_bound_regions).
Decodable and Encodable are implemented for Binder<T> using the impl_binder_encode_decode! macro.
Tuple Fields
0: T1: &'tcx List<BoundVariableKind>Auto Trait Implementations
impl<'tcx, T> !RefUnwindSafe for Binder<'tcx, T>
impl<'tcx, T> !UnwindSafe for Binder<'tcx, T>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more
This method tries to recover the query key from the given DepNode,
something which is needed when forcing DepNodes during red-green
evaluation. The query system will only call this method if
fingerprint_style() is not FingerprintStyle::Opaque.
It is always valid to return None here, in which case incremental
compilation will treat the query as having changed instead of forcing it. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.