Skip to content

Commit bda976d

Browse files
committedMar 23, 2020
add missing const super folds
1 parent 513ea64 commit bda976d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
 

‎src/librustc_trait_selection/traits/project.rs

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
387387
}
388388

389389
fn fold_const(&mut self, constant: &'tcx ty::Const<'tcx>) -> &'tcx ty::Const<'tcx> {
390+
let constant = constant.super_fold_with(self);
390391
constant.eval(self.selcx.tcx(), self.param_env)
391392
}
392393
}

‎src/librustc_trait_selection/traits/query/normalize.rs

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
191191
}
192192

193193
fn fold_const(&mut self, constant: &'tcx ty::Const<'tcx>) -> &'tcx ty::Const<'tcx> {
194+
let constant = constant.super_fold_with(self);
194195
constant.eval(self.infcx.tcx, self.param_env)
195196
}
196197
}

0 commit comments

Comments
 (0)