@@ -45,9 +45,9 @@ pub(crate) fn check_constants(fx: &mut FunctionCx<'_, '_, '_>) -> bool {
45
45
} ;
46
46
match const_. val {
47
47
ConstKind :: Value ( _) => { }
48
- ConstKind :: Unevaluated ( def , ref substs , promoted ) => {
48
+ ConstKind :: Unevaluated ( unevaluated ) => {
49
49
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 )
51
51
{
52
52
all_constants_ok = false ;
53
53
match err {
@@ -124,14 +124,14 @@ pub(crate) fn codegen_constant<'tcx>(
124
124
} ;
125
125
let const_val = match const_. val {
126
126
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 ) => {
128
128
assert ! ( substs. is_empty( ) ) ;
129
129
assert ! ( promoted. is_none( ) ) ;
130
130
131
131
return codegen_static_ref ( fx, def. did , fx. layout_of ( const_. ty ) ) . to_cvalue ( fx) ;
132
132
}
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 ) {
135
135
Ok ( const_val) => const_val,
136
136
Err ( _) => {
137
137
span_bug ! ( constant. span, "erroneous constant not captured by required_consts" ) ;
0 commit comments