@@ -290,22 +290,22 @@ impl NonCopyConst {
290290 promoted : None ,
291291 } ;
292292 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 ) ;
294294 self . is_value_unfrozen_raw ( cx, result, ty)
295295 }
296296
297297 fn is_value_unfrozen_expr < ' tcx > ( & self , cx : & LateContext < ' tcx > , hir_id : HirId , def_id : DefId , ty : Ty < ' tcx > ) -> bool {
298298 let args = cx. typeck_results ( ) . node_args ( hir_id) ;
299299
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 ) ;
301301 self . is_value_unfrozen_raw ( cx, result, ty)
302302 }
303303
304304 pub fn const_eval_resolve < ' tcx > (
305305 tcx : TyCtxt < ' tcx > ,
306306 param_env : ty:: ParamEnv < ' tcx > ,
307307 ct : ty:: UnevaluatedConst < ' tcx > ,
308- span : Option < Span > ,
308+ span : Span ,
309309 ) -> EvalToValTreeResult < ' tcx > {
310310 match ty:: Instance :: resolve ( tcx, param_env, ct. def , ct. args ) {
311311 Ok ( Some ( instance) ) => {
@@ -315,8 +315,8 @@ impl NonCopyConst {
315315 } ;
316316 tcx. const_eval_global_id_for_typeck ( param_env, cid, span)
317317 } ,
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) ) ,
320320 }
321321 }
322322}
0 commit comments