Skip to content

Commit

Permalink
Only expand types that contain projections
Browse files Browse the repository at this point in the history
  • Loading branch information
tmandry committed Oct 10, 2019
1 parent 5f0e5cd commit 6493e6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,10 @@ impl<'tcx> TyCtxt<'tcx> {
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
if let ty::Opaque(def_id, substs) = t.kind {
self.expand_opaque_ty(def_id, substs).unwrap_or(t)
} else {
} else if t.has_projections() {
t.super_fold_with(self)
} else {
t
}
}
}
Expand Down

0 comments on commit 6493e6b

Please sign in to comment.