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

@ -69,7 +69,7 @@ macro_rules! CloneLiftImpls {
macro_rules! TrivialTypeTraversalImpls {
(for <$tcx:lifetime> { $($ty:ty,)+ }) => {
$(
impl<$tcx> $crate::ty::fold::ir::TypeFoldable<$tcx> for $ty {
impl<$tcx> $crate::ty::fold::ir::TypeFoldable<$crate::ty::TyCtxt<$tcx>> for $ty {
fn try_fold_with<F: $crate::ty::fold::FallibleTypeFolder<$tcx>>(
self,
_: &mut F,
@ -121,7 +121,7 @@ macro_rules! EnumTypeTraversalImpl {
(impl<$($p:tt),*> TypeFoldable<$tcx:tt> for $s:path {
$($variants:tt)*
} $(where $($wc:tt)*)*) => {
impl<$($p),*> $crate::ty::fold::ir::TypeFoldable<$tcx> for $s
impl<$($p),*> $crate::ty::fold::ir::TypeFoldable<$crate::ty::TyCtxt<$tcx>> for $s
$(where $($wc)*)*
{
fn try_fold_with<V: $crate::ty::fold::FallibleTypeFolder<$tcx>>(