We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36ef9d7 commit e9978cfCopy full SHA for e9978cf
src/librustc/ty/util.rs
@@ -745,8 +745,10 @@ impl<'tcx> TyCtxt<'tcx> {
745
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
746
if let ty::Opaque(def_id, substs) = t.sty {
747
self.expand_opaque_ty(def_id, substs).unwrap_or(t)
748
- } else {
+ } else if t.has_projections() {
749
t.super_fold_with(self)
750
+ } else {
751
+ t
752
}
753
754
0 commit comments