1
Fork 0

Add Ty to mir::Const::Ty

This commit is contained in:
Boxy 2024-06-03 04:46:24 +01:00
parent 8d6705cdb8
commit 60a5bebbe5
19 changed files with 81 additions and 51 deletions

View file

@ -357,7 +357,7 @@ where
// Check the qualifs of the value of `const` items.
let uneval = match constant.const_ {
Const::Ty(ct)
Const::Ty(_, ct)
if matches!(
ct.kind(),
ty::ConstKind::Param(_) | ty::ConstKind::Error(_) | ty::ConstKind::Value(_, _)
@ -365,7 +365,7 @@ where
{
None
}
Const::Ty(c) => {
Const::Ty(_, c) => {
bug!("expected ConstKind::Param or ConstKind::Value here, found {:?}", c)
}
Const::Unevaluated(uv, _) => Some(uv),