fix #104390, fix ICE in in_operand for ty error
This commit is contained in:
parent
bebd57a960
commit
20ea083d87
3 changed files with 80 additions and 1 deletions
|
@ -351,7 +351,11 @@ where
|
|||
// FIXME(valtrees): check whether const qualifs should behave the same
|
||||
// way for type and mir constants.
|
||||
let uneval = match constant.literal {
|
||||
ConstantKind::Ty(ct) if matches!(ct.kind(), ty::ConstKind::Param(_)) => None,
|
||||
ConstantKind::Ty(ct)
|
||||
if matches!(ct.kind(), ty::ConstKind::Param(_) | ty::ConstKind::Error(_)) =>
|
||||
{
|
||||
None
|
||||
}
|
||||
ConstantKind::Ty(c) => bug!("expected ConstKind::Param here, found {:?}", c),
|
||||
ConstantKind::Unevaluated(uv, _) => Some(uv),
|
||||
ConstantKind::Val(..) => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue