add check for ConstKind::Value(_)
This commit is contained in:
parent
08fd6f719e
commit
ce5ed5b6cc
1 changed files with 7 additions and 2 deletions
|
@ -348,11 +348,16 @@ where
|
||||||
// way for type and mir constants.
|
// way for type and mir constants.
|
||||||
let uneval = match constant.literal {
|
let uneval = match constant.literal {
|
||||||
ConstantKind::Ty(ct)
|
ConstantKind::Ty(ct)
|
||||||
if matches!(ct.kind(), ty::ConstKind::Param(_) | ty::ConstKind::Error(_)) =>
|
if matches!(
|
||||||
|
ct.kind(),
|
||||||
|
ty::ConstKind::Param(_) | ty::ConstKind::Error(_) | ty::ConstKind::Value(_)
|
||||||
|
) =>
|
||||||
{
|
{
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
ConstantKind::Ty(c) => bug!("expected ConstKind::Param here, found {:?}", c),
|
ConstantKind::Ty(c) => {
|
||||||
|
bug!("expected ConstKind::Param or ConstKind::Value here, found {:?}", c)
|
||||||
|
}
|
||||||
ConstantKind::Unevaluated(uv, _) => Some(uv),
|
ConstantKind::Unevaluated(uv, _) => Some(uv),
|
||||||
ConstantKind::Val(..) => None,
|
ConstantKind::Val(..) => None,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue