about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-03-23 19:20:28 +0100
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-03-23 19:20:28 +0100
commitbda976d42db4abc496bb8673246b34e667b48e6f (patch)
treea83337fd7e102aac488c528eae2ed898d3d9de7b /src
parent513ea6405b121e589dafad738b600cab5baa2ab6 (diff)
downloadrust-bda976d42db4abc496bb8673246b34e667b48e6f.tar.gz
rust-bda976d42db4abc496bb8673246b34e667b48e6f.zip
add missing const super folds
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trait_selection/traits/project.rs1
-rw-r--r--src/librustc_trait_selection/traits/query/normalize.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_trait_selection/traits/project.rs b/src/librustc_trait_selection/traits/project.rs
index 6b14f6959bf..0968f470d13 100644
--- a/src/librustc_trait_selection/traits/project.rs
+++ b/src/librustc_trait_selection/traits/project.rs
@@ -387,6 +387,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
     }
 
     fn fold_const(&mut self, constant: &'tcx ty::Const<'tcx>) -> &'tcx ty::Const<'tcx> {
+        let constant = constant.super_fold_with(self);
         constant.eval(self.selcx.tcx(), self.param_env)
     }
 }
diff --git a/src/librustc_trait_selection/traits/query/normalize.rs b/src/librustc_trait_selection/traits/query/normalize.rs
index 99412fafcfa..77128bc8c8a 100644
--- a/src/librustc_trait_selection/traits/query/normalize.rs
+++ b/src/librustc_trait_selection/traits/query/normalize.rs
@@ -191,6 +191,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
     }
 
     fn fold_const(&mut self, constant: &'tcx ty::Const<'tcx>) -> &'tcx ty::Const<'tcx> {
+        let constant = constant.super_fold_with(self);
         constant.eval(self.infcx.tcx, self.param_env)
     }
 }