Make folding traits generic over the Interner
This commit is contained in:
parent
dea342d861
commit
9783fcc13b
39 changed files with 160 additions and 130 deletions
|
@ -464,7 +464,7 @@ struct RemapLateBound<'a, 'tcx> {
|
|||
mapping: &'a FxHashMap<ty::BoundRegionKind, ty::BoundRegionKind>,
|
||||
}
|
||||
|
||||
impl<'tcx> TypeFolder<'tcx> for RemapLateBound<'_, 'tcx> {
|
||||
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateBound<'_, 'tcx> {
|
||||
fn tcx(&self) -> TyCtxt<'tcx> {
|
||||
self.tcx
|
||||
}
|
||||
|
@ -829,7 +829,7 @@ impl<'a, 'tcx> ImplTraitInTraitCollector<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> {
|
||||
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
|
||||
fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {
|
||||
self.ocx.infcx.tcx
|
||||
}
|
||||
|
|
|
@ -850,7 +850,7 @@ fn infer_placeholder_type<'a>(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
}
|
||||
|
||||
impl<'tcx> TypeFolder<'tcx> for MakeNameable<'tcx> {
|
||||
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for MakeNameable<'tcx> {
|
||||
fn tcx(&self) -> TyCtxt<'tcx> {
|
||||
self.tcx
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ struct EraseAllBoundRegions<'tcx> {
|
|||
// us an inaccurate span for an error message, but cannot
|
||||
// lead to unsoundness (we call `delay_span_bug` at the start
|
||||
// of `diagnostic_hir_wf_check`).
|
||||
impl<'tcx> TypeFolder<'tcx> for EraseAllBoundRegions<'tcx> {
|
||||
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for EraseAllBoundRegions<'tcx> {
|
||||
fn tcx<'a>(&'a self) -> TyCtxt<'tcx> {
|
||||
self.tcx
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue