[−][src]Struct rustc_typeck::check::Inherited
Closures defined within the function. For example:
fn foo() { bar(move|| { ... }) }
Here, the function foo() and the closure passed to
bar() will each have their own FnCtxt, but they will
share the inherited fields.
Fields
infcx: InferCtxt<'a, 'tcx>typeck_results: MaybeInProgressTables<'a, 'tcx>locals: RefCell<HirIdMap<LocalTy<'tcx>>>fulfillment_cx: RefCell<Box<dyn TraitEngine<'tcx>>>deferred_sized_obligations: RefCell<Vec<(Ty<'tcx>, Span, ObligationCauseCode<'tcx>)>>deferred_call_resolutions: RefCell<DefIdMap<Vec<DeferredCallResolution<'tcx>>>>deferred_cast_checks: RefCell<Vec<CastCheck<'tcx>>>deferred_generator_interiors: RefCell<Vec<(BodyId, Ty<'tcx>, GeneratorKind)>>opaque_types: RefCell<DefIdMap<OpaqueTypeDecl<'tcx>>>opaque_types_vars: RefCell<FxHashMap<Ty<'tcx>, Ty<'tcx>>>A map from inference variables created from opaque
type instantiations (ty::Infer) to the actual opaque
type (ty::Opaque). Used during fallback to map unconstrained
opaque type inference variables to their corresponding
opaque type.
body_id: Option<BodyId>Implementations
impl<'_, 'tcx> Inherited<'_, 'tcx>[src]
pub fn build(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> InheritedBuilder<'tcx>[src]
impl<'a, 'tcx> Inherited<'a, 'tcx>[src]
pub(in check) fn new(
infcx: InferCtxt<'a, 'tcx>,
def_id: LocalDefId
) -> Self[src]
infcx: InferCtxt<'a, 'tcx>,
def_id: LocalDefId
) -> Self
pub(in check) fn register_predicate(
&self,
obligation: PredicateObligation<'tcx>
)[src]
&self,
obligation: PredicateObligation<'tcx>
)
pub(in check) fn register_predicates<I>(
&self,
obligations: I
) where
I: IntoIterator<Item = PredicateObligation<'tcx>>, [src]
&self,
obligations: I
) where
I: IntoIterator<Item = PredicateObligation<'tcx>>,
pub(in check) fn register_infer_ok_obligations<T>(
&self,
infer_ok: InferOk<'tcx, T>
) -> T[src]
&self,
infer_ok: InferOk<'tcx, T>
) -> T
pub(in check) fn normalize_associated_types_in<T>(
&self,
span: Span,
body_id: HirId,
param_env: ParamEnv<'tcx>,
value: T
) -> T where
T: TypeFoldable<'tcx>, [src]
&self,
span: Span,
body_id: HirId,
param_env: ParamEnv<'tcx>,
value: T
) -> T where
T: TypeFoldable<'tcx>,
Trait Implementations
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for Inherited<'a, 'tcx>
impl<'a, 'tcx> !Send for Inherited<'a, 'tcx>
impl<'a, 'tcx> !Sync for Inherited<'a, 'tcx>
impl<'a, 'tcx> Unpin for Inherited<'a, 'tcx> where
'tcx: 'a,
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for Inherited<'a, 'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.