1
Fork 0

use ParamConst in ExprKind::ConstParam

This commit is contained in:
b-naber 2022-03-15 16:32:40 +01:00
parent e2496b3cf4
commit 9cd8bb0456
5 changed files with 14 additions and 14 deletions

View file

@ -459,8 +459,12 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
self.nodes.push(Node::Leaf(constant))
}
ExprKind::ConstParam {literal, ..} => {
self.nodes.push(Node::Leaf(*literal))
ExprKind::ConstParam {param, ..} => {
let const_param = self.tcx.mk_const(ty::ConstS {
val: ty::ConstKind::Param(*param),
ty: node.ty,
});
self.nodes.push(Node::Leaf(const_param))
}
ExprKind::Call { fun, args, .. } => {