1
Fork 0

normalize before matching on ConstKind

This commit is contained in:
Boxy 2022-12-06 22:53:08 +00:00
parent b6852428a8
commit 9f438bef0b
2 changed files with 13 additions and 1 deletions

View file

@ -30,7 +30,7 @@ pub fn is_const_evaluatable<'tcx>(
span: Span,
) -> Result<(), NotConstEvaluatable> {
let tcx = infcx.tcx;
match unexpanded_ct.kind() {
match tcx.expand_abstract_consts(unexpanded_ct).kind() {
ty::ConstKind::Unevaluated(_) | ty::ConstKind::Expr(_) => (),
ty::ConstKind::Param(_)
| ty::ConstKind::Bound(_, _)