Inline OpportunisticVarResolver::fold_ty.

This commit is contained in:
Nicholas Nethercote 2023-02-03 10:31:11 +11:00
parent f08a3371b0
commit c2cf3f7b24

View File

@ -33,6 +33,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> {
TypeFolder::tcx(&self.shallow_resolver)
}
#[inline]
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
if !t.has_non_region_infer() {
t // micro-optimize -- if there is nothing in this type that this fold affects...