Naming nits
This commit is contained in:
parent
1322f92634
commit
8951342911
7 changed files with 55 additions and 55 deletions
|
@ -121,8 +121,8 @@ impl<T: fmt::Debug> fmt::Debug for List<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx, T: super::DebugWithInfcx<TyCtxt<'tcx>>> super::DebugWithInfcx<TyCtxt<'tcx>> for List<T> {
|
impl<'tcx, T: super::DebugWithInfcx<TyCtxt<'tcx>>> super::DebugWithInfcx<TyCtxt<'tcx>> for List<T> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
fmt::Debug::fmt(&this.map(|this| this.as_slice()), f)
|
fmt::Debug::fmt(&this.map(|this| this.as_slice()), f)
|
||||||
|
|
|
@ -93,8 +93,8 @@ impl<'tcx> fmt::Debug for ty::FnSig<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::FnSig<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::FnSig<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
let sig = this.data;
|
let sig = this.data;
|
||||||
|
@ -149,8 +149,8 @@ impl<'tcx> fmt::Debug for ty::TraitRef<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> ty::DebugWithInfcx<TyCtxt<'tcx>> for Ty<'tcx> {
|
impl<'tcx> ty::DebugWithInfcx<TyCtxt<'tcx>> for Ty<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
this.data.fmt(f)
|
this.data.fmt(f)
|
||||||
|
@ -242,8 +242,8 @@ impl<'tcx> fmt::Debug for AliasTy<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for AliasTy<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for AliasTy<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
f.debug_struct("AliasTy")
|
f.debug_struct("AliasTy")
|
||||||
|
@ -263,8 +263,8 @@ impl<'tcx> fmt::Debug for ty::InferConst<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::InferConst<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::InferConst<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
use ty::InferConst::*;
|
use ty::InferConst::*;
|
||||||
|
@ -287,8 +287,8 @@ impl<'tcx> fmt::Debug for ty::consts::Expr<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::consts::Expr<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::consts::Expr<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
match this.data {
|
match this.data {
|
||||||
|
@ -320,8 +320,8 @@ impl<'tcx> fmt::Debug for ty::UnevaluatedConst<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::UnevaluatedConst<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::UnevaluatedConst<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
f.debug_struct("UnevaluatedConst")
|
f.debug_struct("UnevaluatedConst")
|
||||||
|
@ -337,8 +337,8 @@ impl<'tcx> fmt::Debug for ty::Const<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::Const<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::Const<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
// If this is a value, we spend some effort to make it look nice.
|
// If this is a value, we spend some effort to make it look nice.
|
||||||
|
@ -395,8 +395,8 @@ impl<'tcx> fmt::Debug for GenericArg<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for GenericArg<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for GenericArg<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
match this.data.unpack() {
|
match this.data.unpack() {
|
||||||
|
@ -413,8 +413,8 @@ impl<'tcx> fmt::Debug for Region<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for Region<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for Region<'tcx> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
write!(f, "{:?}", &this.map(|data| data.kind()))
|
write!(f, "{:?}", &this.map(|data| data.kind()))
|
||||||
|
@ -422,8 +422,8 @@ impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for Region<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::RegionVid {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::RegionVid {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
match this.infcx.and_then(|infcx| infcx.universe_of_lt(*this.data)) {
|
match this.infcx.and_then(|infcx| infcx.universe_of_lt(*this.data)) {
|
||||||
|
@ -434,8 +434,8 @@ impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ty::RegionVid {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx, T: DebugWithInfcx<TyCtxt<'tcx>>> DebugWithInfcx<TyCtxt<'tcx>> for ty::Binder<'tcx, T> {
|
impl<'tcx, T: DebugWithInfcx<TyCtxt<'tcx>>> DebugWithInfcx<TyCtxt<'tcx>> for ty::Binder<'tcx, T> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
f.debug_tuple("Binder")
|
f.debug_tuple("Binder")
|
||||||
|
|
|
@ -683,8 +683,8 @@ pub enum ExistentialPredicate<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ExistentialPredicate<'tcx> {
|
impl<'tcx> DebugWithInfcx<TyCtxt<'tcx>> for ExistentialPredicate<'tcx> {
|
||||||
fn fmt<InfCtx: rustc_type_ir::InferCtxtLike<TyCtxt<'tcx>>>(
|
fn fmt<Infcx: rustc_type_ir::InferCtxtLike<TyCtxt<'tcx>>>(
|
||||||
this: rustc_type_ir::OptWithInfcx<'_, TyCtxt<'tcx>, InfCtx, &Self>,
|
this: rustc_type_ir::OptWithInfcx<'_, TyCtxt<'tcx>, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
fmt::Debug::fmt(&this.data, f)
|
fmt::Debug::fmt(&this.data, f)
|
||||||
|
|
|
@ -231,13 +231,13 @@ impl<I: Interner> Clone for ConstKind<I> {
|
||||||
|
|
||||||
impl<I: Interner> fmt::Debug for ConstKind<I> {
|
impl<I: Interner> fmt::Debug for ConstKind<I> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
OptWithInfcx::new_no_ctx(self).fmt(f)
|
OptWithInfcx::with_no_infcx(self).fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner> DebugWithInfcx<I> for ConstKind<I> {
|
impl<I: Interner> DebugWithInfcx<I> for ConstKind<I> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
use ConstKind::*;
|
use ConstKind::*;
|
||||||
|
|
|
@ -26,15 +26,15 @@ impl<I: Interner> InferCtxtLike<I> for core::convert::Infallible {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait DebugWithInfcx<I: Interner>: fmt::Debug {
|
pub trait DebugWithInfcx<I: Interner>: fmt::Debug {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut fmt::Formatter<'_>,
|
f: &mut fmt::Formatter<'_>,
|
||||||
) -> fmt::Result;
|
) -> fmt::Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner, T: DebugWithInfcx<I> + ?Sized> DebugWithInfcx<I> for &'_ T {
|
impl<I: Interner, T: DebugWithInfcx<I> + ?Sized> DebugWithInfcx<I> for &'_ T {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut fmt::Formatter<'_>,
|
f: &mut fmt::Formatter<'_>,
|
||||||
) -> fmt::Result {
|
) -> fmt::Result {
|
||||||
<T as DebugWithInfcx<I>>::fmt(this.map(|&data| data), f)
|
<T as DebugWithInfcx<I>>::fmt(this.map(|&data| data), f)
|
||||||
|
@ -42,8 +42,8 @@ impl<I: Interner, T: DebugWithInfcx<I> + ?Sized> DebugWithInfcx<I> for &'_ T {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner, T: DebugWithInfcx<I>> DebugWithInfcx<I> for [T] {
|
impl<I: Interner, T: DebugWithInfcx<I>> DebugWithInfcx<I> for [T] {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut fmt::Formatter<'_>,
|
f: &mut fmt::Formatter<'_>,
|
||||||
) -> fmt::Result {
|
) -> fmt::Result {
|
||||||
match f.alternate() {
|
match f.alternate() {
|
||||||
|
@ -70,46 +70,46 @@ impl<I: Interner, T: DebugWithInfcx<I>> DebugWithInfcx<I> for [T] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct OptWithInfcx<'a, I: Interner, InfCtx: InferCtxtLike<I>, T> {
|
pub struct OptWithInfcx<'a, I: Interner, Infcx: InferCtxtLike<I>, T> {
|
||||||
pub data: T,
|
pub data: T,
|
||||||
pub infcx: Option<&'a InfCtx>,
|
pub infcx: Option<&'a Infcx>,
|
||||||
_interner: PhantomData<I>,
|
_interner: PhantomData<I>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: Copy> Copy for OptWithInfcx<'_, I, InfCtx, T> {}
|
impl<I: Interner, Infcx: InferCtxtLike<I>, T: Copy> Copy for OptWithInfcx<'_, I, Infcx, T> {}
|
||||||
|
|
||||||
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: Clone> Clone for OptWithInfcx<'_, I, InfCtx, T> {
|
impl<I: Interner, Infcx: InferCtxtLike<I>, T: Clone> Clone for OptWithInfcx<'_, I, Infcx, T> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self { data: self.data.clone(), infcx: self.infcx, _interner: self._interner }
|
Self { data: self.data.clone(), infcx: self.infcx, _interner: self._interner }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, I: Interner, T> OptWithInfcx<'a, I, core::convert::Infallible, T> {
|
impl<'a, I: Interner, T> OptWithInfcx<'a, I, core::convert::Infallible, T> {
|
||||||
pub fn new_no_ctx(data: T) -> Self {
|
pub fn with_no_infcx(data: T) -> Self {
|
||||||
Self { data, infcx: None, _interner: PhantomData }
|
Self { data, infcx: None, _interner: PhantomData }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, I: Interner, InfCtx: InferCtxtLike<I>, T> OptWithInfcx<'a, I, InfCtx, T> {
|
impl<'a, I: Interner, Infcx: InferCtxtLike<I>, T> OptWithInfcx<'a, I, Infcx, T> {
|
||||||
pub fn new(data: T, infcx: &'a InfCtx) -> Self {
|
pub fn new(data: T, infcx: &'a Infcx) -> Self {
|
||||||
Self { data, infcx: Some(infcx), _interner: PhantomData }
|
Self { data, infcx: Some(infcx), _interner: PhantomData }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn wrap<U>(self, u: U) -> OptWithInfcx<'a, I, InfCtx, U> {
|
pub fn wrap<U>(self, u: U) -> OptWithInfcx<'a, I, Infcx, U> {
|
||||||
OptWithInfcx { data: u, infcx: self.infcx, _interner: PhantomData }
|
OptWithInfcx { data: u, infcx: self.infcx, _interner: PhantomData }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> OptWithInfcx<'a, I, InfCtx, U> {
|
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> OptWithInfcx<'a, I, Infcx, U> {
|
||||||
OptWithInfcx { data: f(self.data), infcx: self.infcx, _interner: PhantomData }
|
OptWithInfcx { data: f(self.data), infcx: self.infcx, _interner: PhantomData }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn as_ref(&self) -> OptWithInfcx<'a, I, InfCtx, &T> {
|
pub fn as_ref(&self) -> OptWithInfcx<'a, I, Infcx, &T> {
|
||||||
OptWithInfcx { data: &self.data, infcx: self.infcx, _interner: PhantomData }
|
OptWithInfcx { data: &self.data, infcx: self.infcx, _interner: PhantomData }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner, InfCtx: InferCtxtLike<I>, T: DebugWithInfcx<I>> fmt::Debug
|
impl<I: Interner, Infcx: InferCtxtLike<I>, T: DebugWithInfcx<I>> fmt::Debug
|
||||||
for OptWithInfcx<'_, I, InfCtx, T>
|
for OptWithInfcx<'_, I, Infcx, T>
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
DebugWithInfcx::fmt(self.as_ref(), f)
|
DebugWithInfcx::fmt(self.as_ref(), f)
|
||||||
|
|
|
@ -274,8 +274,8 @@ impl<I: Interner> hash::Hash for RegionKind<I> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner> DebugWithInfcx<I> for RegionKind<I> {
|
impl<I: Interner> DebugWithInfcx<I> for RegionKind<I> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> core::fmt::Result {
|
) -> core::fmt::Result {
|
||||||
match this.data {
|
match this.data {
|
||||||
|
@ -301,7 +301,7 @@ impl<I: Interner> DebugWithInfcx<I> for RegionKind<I> {
|
||||||
}
|
}
|
||||||
impl<I: Interner> fmt::Debug for RegionKind<I> {
|
impl<I: Interner> fmt::Debug for RegionKind<I> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
OptWithInfcx::new_no_ctx(self).fmt(f)
|
OptWithInfcx::with_no_infcx(self).fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -534,8 +534,8 @@ impl<I: Interner> hash::Hash for TyKind<I> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner> DebugWithInfcx<I> for TyKind<I> {
|
impl<I: Interner> DebugWithInfcx<I> for TyKind<I> {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut core::fmt::Formatter<'_>,
|
f: &mut core::fmt::Formatter<'_>,
|
||||||
) -> fmt::Result {
|
) -> fmt::Result {
|
||||||
match this.data {
|
match this.data {
|
||||||
|
@ -617,7 +617,7 @@ impl<I: Interner> DebugWithInfcx<I> for TyKind<I> {
|
||||||
// This is manually implemented because a derive would require `I: Debug`
|
// This is manually implemented because a derive would require `I: Debug`
|
||||||
impl<I: Interner> fmt::Debug for TyKind<I> {
|
impl<I: Interner> fmt::Debug for TyKind<I> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
OptWithInfcx::new_no_ctx(self).fmt(f)
|
OptWithInfcx::with_no_infcx(self).fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,8 +1239,8 @@ impl fmt::Debug for InferTy {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: Interner<InferTy = InferTy>> DebugWithInfcx<I> for InferTy {
|
impl<I: Interner<InferTy = InferTy>> DebugWithInfcx<I> for InferTy {
|
||||||
fn fmt<InfCtx: InferCtxtLike<I>>(
|
fn fmt<Infcx: InferCtxtLike<I>>(
|
||||||
this: OptWithInfcx<'_, I, InfCtx, &Self>,
|
this: OptWithInfcx<'_, I, Infcx, &Self>,
|
||||||
f: &mut fmt::Formatter<'_>,
|
f: &mut fmt::Formatter<'_>,
|
||||||
) -> fmt::Result {
|
) -> fmt::Result {
|
||||||
use InferTy::*;
|
use InferTy::*;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue