Rollup merge of #110345 - nnethercote:rm-Super-impls-for-Region, r=compiler-errors
Remove `TypeSuper{Foldable,Visitable}` impls for `Region`. These traits exist so that folders/visitors can recurse into types of interest: binders, types, regions, predicates, and consts. But `Region` is non-recursive and cannot contain other types of interest, so its methods in these traits are trivial. This commit inlines and removes those trivial methods. r? `@compiler-errors`
This commit is contained in:
commit
eba419195c
11 changed files with 51 additions and 66 deletions
|
@ -998,7 +998,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for BoundVarsCollector<'tcx> {
|
|||
_ => (),
|
||||
};
|
||||
|
||||
r.super_visit_with(self)
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for NamedBoundVarSubstitutor<'a, 'tcx> {
|
|||
_ => (),
|
||||
};
|
||||
|
||||
r.super_fold_with(self)
|
||||
r
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ParamsSubstitutor<'tcx> {
|
|||
}
|
||||
},
|
||||
|
||||
_ => r.super_fold_with(self),
|
||||
_ => r,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1223,6 +1223,6 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for PlaceholdersCollector {
|
|||
_ => (),
|
||||
};
|
||||
|
||||
r.super_visit_with(self)
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue