Struct clippy_utils::rustc_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
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.