Skip to content

Commit 802554f

Browse files
committed
Only expand types that contain projections
1 parent fe09bb5 commit 802554f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/ty/util.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,10 @@ impl<'tcx> TyCtxt<'tcx> {
745745
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
746746
if let ty::Opaque(def_id, substs) = t.kind {
747747
self.expand_opaque_ty(def_id, substs).unwrap_or(t)
748-
} else {
748+
} else if t.has_projections() {
749749
t.super_fold_with(self)
750+
} else {
751+
t
750752
}
751753
}
752754
}

0 commit comments

Comments
 (0)