We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08fd6f7 commit ce5ed5bCopy full SHA for ce5ed5b
compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
@@ -348,11 +348,16 @@ where
348
// way for type and mir constants.
349
let uneval = match constant.literal {
350
ConstantKind::Ty(ct)
351
- if matches!(ct.kind(), ty::ConstKind::Param(_) | ty::ConstKind::Error(_)) =>
+ if matches!(
352
+ ct.kind(),
353
+ ty::ConstKind::Param(_) | ty::ConstKind::Error(_) | ty::ConstKind::Value(_)
354
+ ) =>
355
{
356
None
357
}
- ConstantKind::Ty(c) => bug!("expected ConstKind::Param here, found {:?}", c),
358
+ ConstantKind::Ty(c) => {
359
+ bug!("expected ConstKind::Param or ConstKind::Value here, found {:?}", c)
360
+ }
361
ConstantKind::Unevaluated(uv, _) => Some(uv),
362
ConstantKind::Val(..) => None,
363
};
0 commit comments