1
Fork 0

Make folding traits generic over the Interner

This commit is contained in:
Alan Egerton 2023-02-11 09:13:27 +00:00
parent dea342d861
commit 9783fcc13b
No known key found for this signature in database
GPG key ID: 7D4C2F6C22122532
39 changed files with 160 additions and 130 deletions

View file

@ -1852,7 +1852,7 @@ struct InferenceLiteralEraser<'tcx> {
tcx: TyCtxt<'tcx>,
}
impl<'tcx> TypeFolder<'tcx> for InferenceLiteralEraser<'tcx> {
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for InferenceLiteralEraser<'tcx> {
fn tcx(&self) -> TyCtxt<'tcx> {
self.tcx
}
@ -1870,7 +1870,7 @@ struct ShallowResolver<'a, 'tcx> {
infcx: &'a InferCtxt<'tcx>,
}
impl<'a, 'tcx> TypeFolder<'tcx> for ShallowResolver<'a, 'tcx> {
impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for ShallowResolver<'a, 'tcx> {
fn tcx<'b>(&'b self) -> TyCtxt<'tcx> {
self.infcx.tcx
}
@ -2064,7 +2064,7 @@ fn replace_param_and_infer_substs_with_placeholder<'tcx>(
idx: u32,
}
impl<'tcx> TypeFolder<'tcx> for ReplaceParamAndInferWithPlaceholder<'tcx> {
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ReplaceParamAndInferWithPlaceholder<'tcx> {
fn tcx(&self) -> TyCtxt<'tcx> {
self.tcx
}