Make EarlyBinder's inner value private; and fix all of the resulting errors
This commit is contained in:
parent
03534ac8b7
commit
c40e9cc7ca
16 changed files with 57 additions and 54 deletions
|
@ -123,7 +123,7 @@ pub trait Printer<'tcx>: Sized {
|
|||
impl_trait_ref.map(|i| i.subst(self.tcx(), substs)),
|
||||
)
|
||||
} else {
|
||||
(self_ty.0, impl_trait_ref.map(|i| i.0))
|
||||
(self_ty.subst_identity(), impl_trait_ref.map(|i| i.subst_identity()))
|
||||
};
|
||||
self.print_impl_path(def_id, substs, self_ty, impl_trait_ref)
|
||||
}
|
||||
|
|
|
@ -2366,7 +2366,7 @@ impl<'tcx> Ty<'tcx> {
|
|||
|
||||
ty::Tuple(tys) => tys.iter().all(|ty| ty.is_trivially_sized(tcx)),
|
||||
|
||||
ty::Adt(def, _substs) => def.sized_constraint(tcx).0.is_empty(),
|
||||
ty::Adt(def, _substs) => def.sized_constraint(tcx).skip_binder().is_empty(),
|
||||
|
||||
ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) => false,
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ impl<'tcx, T: TypeVisitable<TyCtxt<'tcx>>> TypeVisitable<TyCtxt<'tcx>> for &'tcx
|
|||
/// [`subst_identity`](EarlyBinder::subst_identity) or [`skip_binder`](EarlyBinder::skip_binder).
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
#[derive(Encodable, Decodable, HashStable)]
|
||||
pub struct EarlyBinder<T>(pub T);
|
||||
pub struct EarlyBinder<T>(T);
|
||||
|
||||
/// For early binders, you should first call `subst` before using any visitors.
|
||||
impl<'tcx, T> !TypeFoldable<TyCtxt<'tcx>> for ty::EarlyBinder<T> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue