@@ -7,7 +7,7 @@ use std::str::FromStr;
77use std:: time:: Duration ;
88use std:: { cmp, env, iter} ;
99
10- use rustc_ast:: expand:: allocator:: { ALLOC_ERROR_HANDLER , AllocatorKind , global_fn_name} ;
10+ use rustc_ast:: expand:: allocator:: { AllocatorKind , global_fn_name} ;
1111use rustc_ast:: { self as ast, * } ;
1212use rustc_data_structures:: fx:: FxHashSet ;
1313use rustc_data_structures:: owned_slice:: OwnedSlice ;
@@ -25,8 +25,8 @@ use rustc_middle::ty::data_structures::IndexSet;
2525use rustc_middle:: ty:: { TyCtxt , TyCtxtFeed } ;
2626use rustc_proc_macro:: bridge:: client:: ProcMacro ;
2727use rustc_session:: config:: {
28- self , CrateType , ExtendedTargetModifierInfo , ExternLocation , OptionsTargetModifiers ,
29- TargetModifier ,
28+ self , CrateType , ExtendedTargetModifierInfo , ExternLocation , OomStrategy ,
29+ OptionsTargetModifiers , TargetModifier ,
3030} ;
3131use rustc_session:: cstore:: { CrateDepKind , CrateSource , ExternCrate , ExternCrateSource } ;
3232use rustc_session:: lint:: { self , BuiltinLintDiag } ;
@@ -322,10 +322,6 @@ impl CStore {
322322 self . allocator_kind
323323 }
324324
325- pub ( crate ) fn alloc_error_handler_kind ( & self ) -> Option < AllocatorKind > {
326- self . alloc_error_handler_kind
327- }
328-
329325 pub ( crate ) fn has_global_allocator ( & self ) -> bool {
330326 self . has_global_allocator
331327 }
@@ -1068,7 +1064,7 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
10681064 spans => !spans. is_empty ( ) ,
10691065 } ;
10701066 self . cstore . has_alloc_error_handler =
1071- match & * fn_spans ( krate, Symbol :: intern ( ALLOC_ERROR_HANDLER ) ) {
1067+ match & * fn_spans ( krate, Symbol :: intern ( OomStrategy :: SYMBOL ) ) {
10721068 [ span1, span2, ..] => {
10731069 self . dcx ( ) . emit_err ( errors:: NoMultipleAllocErrorHandler {
10741070 span2 : * span2,
0 commit comments