@@ -45,9 +45,9 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
4545 } ;
4646 match const_. val {
4747 ConstKind :: Value ( _) => { }
48- ConstKind :: Unevaluated ( def , ref substs , promoted ) => {
48+ ConstKind :: Unevaluated ( unevaluated ) => {
4949 if let Err ( err) =
50- fx. tcx . const_eval_resolve ( ParamEnv :: reveal_all ( ) , def , substs , promoted , None )
50+ fx. tcx . const_eval_resolve ( ParamEnv :: reveal_all ( ) , unevaluated , None )
5151 {
5252 all_constants_ok = false ;
5353 match err {
@@ -124,14 +124,14 @@ pub(crate) fn codegen_constant<'tcx>(
124124 } ;
125125 let const_val = match const_. val {
126126 ConstKind :: Value ( const_val) => const_val,
127- ConstKind :: Unevaluated ( def, ref substs, promoted) if fx. tcx . is_static ( def. did ) => {
127+ ConstKind :: Unevaluated ( ty :: Unevaluated { def, substs, promoted } ) if fx. tcx . is_static ( def. did ) => {
128128 assert ! ( substs. is_empty( ) ) ;
129129 assert ! ( promoted. is_none( ) ) ;
130130
131131 return codegen_static_ref ( fx, def. did , fx. layout_of ( const_. ty ) ) . to_cvalue ( fx) ;
132132 }
133- ConstKind :: Unevaluated ( def , ref substs , promoted ) => {
134- match fx. tcx . const_eval_resolve ( ParamEnv :: reveal_all ( ) , def , substs , promoted , None ) {
133+ ConstKind :: Unevaluated ( unevaluated ) => {
134+ match fx. tcx . const_eval_resolve ( ParamEnv :: reveal_all ( ) , unevaluated , None ) {
135135 Ok ( const_val) => const_val,
136136 Err ( _) => {
137137 span_bug ! ( constant. span, "erroneous constant not captured by required_consts" ) ;
0 commit comments