struct CanonicalVarMatcher<'tcx> {
tcx: TyCtxt<'tcx>,
values: Vec<Option<GenericArg<'tcx>>>,
}Fields§
§tcx: TyCtxt<'tcx>§values: Vec<Option<GenericArg<'tcx>>>Implementations§
Source§impl<'tcx> CanonicalVarMatcher<'tcx>
impl<'tcx> CanonicalVarMatcher<'tcx>
Trait Implementations§
Source§impl<'tcx> TypeRelation<TyCtxt<'tcx>> for CanonicalVarMatcher<'tcx>
impl<'tcx> TypeRelation<TyCtxt<'tcx>> for CanonicalVarMatcher<'tcx>
fn cx(&self) -> TyCtxt<'tcx>
fn relate_ty_args( &mut self, a_ty: Ty<'tcx>, _: Ty<'tcx>, _: DefId, a_args: GenericArgsRef<'tcx>, b_args: GenericArgsRef<'tcx>, _: impl FnOnce(GenericArgsRef<'tcx>) -> Ty<'tcx>, ) -> RelateResult<'tcx, Ty<'tcx>>
Source§fn relate_with_variance<T: Relate<TyCtxt<'tcx>>>(
&mut self,
_: Variance,
_: VarianceDiagInfo<TyCtxt<'tcx>>,
a: T,
b: T,
) -> RelateResult<'tcx, T>
fn relate_with_variance<T: Relate<TyCtxt<'tcx>>>( &mut self, _: Variance, _: VarianceDiagInfo<TyCtxt<'tcx>>, a: T, b: T, ) -> RelateResult<'tcx, T>
Switch variance for the purpose of relating
a and b.fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>>
fn regions( &mut self, a: Region<'tcx>, _: Region<'tcx>, ) -> RelateResult<'tcx, Region<'tcx>>
fn consts( &mut self, a: Const<'tcx>, b: Const<'tcx>, ) -> RelateResult<'tcx, Const<'tcx>>
fn binders<T>(
&mut self,
a: Binder<'tcx, T>,
b: Binder<'tcx, T>,
) -> RelateResult<'tcx, Binder<'tcx, T>>where
T: Relate<TyCtxt<'tcx>>,
Auto Trait Implementations§
impl<'tcx> Freeze for CanonicalVarMatcher<'tcx>
impl<'tcx> !RefUnwindSafe for CanonicalVarMatcher<'tcx>
impl<'tcx> !Send for CanonicalVarMatcher<'tcx>
impl<'tcx> !Sync for CanonicalVarMatcher<'tcx>
impl<'tcx> Unpin for CanonicalVarMatcher<'tcx>
impl<'tcx> UnsafeUnpin for CanonicalVarMatcher<'tcx>
impl<'tcx> !UnwindSafe for CanonicalVarMatcher<'tcx>
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<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
§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§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more