1
Fork 0

more things are const evaluatable *sparkles*

This commit is contained in:
Ellen 2021-02-01 20:05:43 +00:00
parent 02b85d7220
commit 7f8530f16b
5 changed files with 42 additions and 13 deletions

View file

@ -132,7 +132,7 @@ where
tcx: TyCtxt<'tcx>,
ct: AbstractConst<'tcx>,
) -> ControlFlow<V::BreakTy> {
const_evaluatable::walk_abstract_const(tcx, ct, |node| match node {
const_evaluatable::walk_abstract_const(tcx, ct, |node| match node.root() {
ACNode::Leaf(leaf) => {
let leaf = leaf.subst(tcx, ct.substs);
self.visit_const(leaf)