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
348348 // way for type and mir constants.
349349 let uneval = match constant. literal {
350350 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+ ) =>
352355 {
353356 None
354357 }
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+ }
356361 ConstantKind :: Unevaluated ( uv, _) => Some ( uv) ,
357362 ConstantKind :: Val ( ..) => None ,
358363 } ;
You can’t perform that action at this time.
0 commit comments