@@ -290,22 +290,22 @@ impl NonCopyConst {
290
290
promoted : None ,
291
291
} ;
292
292
let param_env = cx. tcx . param_env ( def_id) . with_reveal_all_normalized ( cx. tcx ) ;
293
- let result = cx. tcx . const_eval_global_id_for_typeck ( param_env, cid, None ) ;
293
+ let result = cx. tcx . const_eval_global_id_for_typeck ( param_env, cid, rustc_span :: DUMMY_SP ) ;
294
294
self . is_value_unfrozen_raw ( cx, result, ty)
295
295
}
296
296
297
297
fn is_value_unfrozen_expr < ' tcx > ( & self , cx : & LateContext < ' tcx > , hir_id : HirId , def_id : DefId , ty : Ty < ' tcx > ) -> bool {
298
298
let args = cx. typeck_results ( ) . node_args ( hir_id) ;
299
299
300
- let result = Self :: const_eval_resolve ( cx. tcx , cx. param_env , ty:: UnevaluatedConst :: new ( def_id, args) , None ) ;
300
+ let result = Self :: const_eval_resolve ( cx. tcx , cx. param_env , ty:: UnevaluatedConst :: new ( def_id, args) , rustc_span :: DUMMY_SP ) ;
301
301
self . is_value_unfrozen_raw ( cx, result, ty)
302
302
}
303
303
304
304
pub fn const_eval_resolve < ' tcx > (
305
305
tcx : TyCtxt < ' tcx > ,
306
306
param_env : ty:: ParamEnv < ' tcx > ,
307
307
ct : ty:: UnevaluatedConst < ' tcx > ,
308
- span : Option < Span > ,
308
+ span : Span ,
309
309
) -> EvalToValTreeResult < ' tcx > {
310
310
match ty:: Instance :: resolve ( tcx, param_env, ct. def , ct. args ) {
311
311
Ok ( Some ( instance) ) => {
@@ -315,8 +315,8 @@ impl NonCopyConst {
315
315
} ;
316
316
tcx. const_eval_global_id_for_typeck ( param_env, cid, span)
317
317
} ,
318
- Ok ( None ) => Err ( ErrorHandled :: TooGeneric ( span. unwrap_or ( rustc_span :: DUMMY_SP ) ) ) ,
319
- Err ( err) => Err ( ErrorHandled :: Reported ( err. into ( ) , span. unwrap_or ( rustc_span :: DUMMY_SP ) ) ) ,
318
+ Ok ( None ) => Err ( ErrorHandled :: TooGeneric ( span) ) ,
319
+ Err ( err) => Err ( ErrorHandled :: Reported ( err. into ( ) , span) ) ,
320
320
}
321
321
}
322
322
}
0 commit comments