File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -117,17 +117,7 @@ pub(crate) fn codegen_constant<'tcx>(
117
117
constant : & Constant < ' tcx > ,
118
118
) -> CValue < ' tcx > {
119
119
let ( const_val, ty) = match fx. monomorphize ( constant. literal ) {
120
- ConstantKind :: Ty ( const_) => match const_. kind ( ) {
121
- ConstKind :: Value ( valtree) => {
122
- ( fx. tcx . valtree_to_const_val ( ( const_. ty ( ) , valtree) ) , const_. ty ( ) )
123
- }
124
- ConstKind :: Unevaluated ( _) => bug ! ( "expected constant to be evaluated at this stage" ) ,
125
- ConstKind :: Param ( _)
126
- | ConstKind :: Infer ( _)
127
- | ConstKind :: Bound ( _, _)
128
- | ConstKind :: Placeholder ( _)
129
- | ConstKind :: Error ( _) => unreachable ! ( "{:?}" , const_) ,
130
- } ,
120
+ ConstantKind :: Ty ( const_) => unreachable ! ( "{:?}" , const_) ,
131
121
ConstantKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } , ty)
132
122
if fx. tcx . is_static ( def. did ) =>
133
123
{
You can’t perform that action at this time.
0 commit comments