struct ConfirmContext<'a, 'db> {
ctx: &'a mut InferenceContext<'db>,
candidate: FunctionId,
call_expr: ExprId,
}Fields§
§ctx: &'a mut InferenceContext<'db>§candidate: FunctionId§call_expr: ExprIdImplementations§
Source§impl<'a, 'db> ConfirmContext<'a, 'db>
impl<'a, 'db> ConfirmContext<'a, 'db>
fn new( ctx: &'a mut InferenceContext<'db>, candidate: FunctionId, call_expr: ExprId, ) -> ConfirmContext<'a, 'db>
fn db(&self) -> &'db dyn HirDatabase
fn interner(&self) -> DbInterner<'db>
fn infcx(&self) -> &InferCtxt<'db>
fn confirm( &mut self, unadjusted_self_ty: Ty<'db>, pick: &Pick<'db>, generic_args: Option<&HirGenericArgs>, ) -> ConfirmResult<'db>
fn adjust_self_ty( &mut self, unadjusted_self_ty: Ty<'db>, pick: &Pick<'db>, ) -> (Ty<'db>, Box<[Adjustment]>)
Sourcefn fresh_receiver_args(
&mut self,
self_ty: Ty<'db>,
pick: &Pick<'db>,
) -> GenericArgs<'db>
fn fresh_receiver_args( &mut self, self_ty: Ty<'db>, pick: &Pick<'db>, ) -> GenericArgs<'db>
Returns a set of generic parameters for the method receiver where all type and region parameters are instantiated with fresh variables. This generic parameters does not include any parameters declared on the method itself.
Note that this generic parameters may include late-bound regions from the impl level. If so,
these are instantiated later in the instantiate_method_sig routine.
fn extract_existential_trait_ref<R, F>(&self, self_ty: Ty<'db>, closure: F) -> R
fn instantiate_method_args( &mut self, generic_args: Option<&HirGenericArgs>, parent_args: GenericArgs<'db>, ) -> GenericArgs<'db>
fn unify_receivers( &mut self, self_ty: Ty<'db>, method_self_ty: Ty<'db>, pick: &Pick<'db>, )
fn instantiate_method_sig<'c>( &mut self, pick: &Pick<'db>, all_args: &'c [GenericArg<'db>], ) -> (FnSig<'db>, impl Iterator<Item = Obligation<'db, Predicate<'db>>> + use<'c, 'db>)
fn add_obligations( &mut self, sig: FnSig<'db>, all_args: GenericArgs<'db>, method_predicates: impl Iterator<Item = Obligation<'db, Predicate<'db>>>, )
fn predicates_require_illegal_sized_bound( &self, predicates: impl Iterator<Item = Clause<'db>>, ) -> bool
fn check_for_illegal_method_calls(&self)
fn lint_shadowed_supertrait_items(&self, pick: &Pick<'_>)
fn upcast( &self, source_trait_ref: PolyTraitRef<'db>, target_trait_def_id: TraitId, ) -> PolyTraitRef<'db>
fn instantiate_binder_with_fresh_vars<T>(&self, value: Binder<'db, T>) -> Twhere
T: TypeFoldable<DbInterner<'db>> + Copy,
Auto Trait Implementations§
impl<'a, 'db> Freeze for ConfirmContext<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for ConfirmContext<'a, 'db>
impl<'a, 'db> !Send for ConfirmContext<'a, 'db>
impl<'a, 'db> !Sync for ConfirmContext<'a, 'db>
impl<'a, 'db> Unpin for ConfirmContext<'a, 'db>
impl<'a, 'db> UnsafeUnpin for ConfirmContext<'a, 'db>
impl<'a, 'db> !UnwindSafe for ConfirmContext<'a, 'db>
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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