File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/rustc_const_eval/src/transform/check_consts Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -348,11 +348,16 @@ where
348
348
// way for type and mir constants.
349
349
let uneval = match constant. literal {
350
350
ConstantKind :: Ty ( ct)
351
- if matches ! ( ct. kind( ) , ty:: ConstKind :: Param ( _) | ty:: ConstKind :: Error ( _) ) =>
351
+ if matches ! (
352
+ ct. kind( ) ,
353
+ ty:: ConstKind :: Param ( _) | ty:: ConstKind :: Error ( _) | ty:: ConstKind :: Value ( _)
354
+ ) =>
352
355
{
353
356
None
354
357
}
355
- 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
+ }
356
361
ConstantKind :: Unevaluated ( uv, _) => Some ( uv) ,
357
362
ConstantKind :: Val ( ..) => None ,
358
363
} ;
You can’t perform that action at this time.
0 commit comments