@@ -2,7 +2,6 @@ use crate::middle::codegen_fn_attrs::CodegenFnAttrFlags;
22use crate :: middle:: lang_items:: DropInPlaceFnLangItem ;
33use crate :: ty:: print:: { FmtPrinter , Printer } ;
44use crate :: ty:: { self , SubstsRef , Ty , TyCtxt , TypeFoldable } ;
5- use rustc_data_structures:: AtomicRef ;
65use rustc_hir:: def:: Namespace ;
76use rustc_hir:: def_id:: { CrateNum , DefId } ;
87use rustc_macros:: HashStable ;
@@ -279,7 +278,7 @@ impl<'tcx> Instance<'tcx> {
279278 def_id : DefId ,
280279 substs : SubstsRef < ' tcx > ,
281280 ) -> Option < Instance < ' tcx > > {
282- ( * RESOLVE_INSTANCE ) ( tcx , param_env, def_id, substs)
281+ tcx . resolve_instance ( ( param_env, def_id, substs) )
283282 }
284283
285284 pub fn resolve_for_fn_ptr (
@@ -408,21 +407,3 @@ fn needs_fn_once_adapter_shim(
408407 ( ty:: ClosureKind :: FnMut , _) | ( ty:: ClosureKind :: FnOnce , _) => Err ( ( ) ) ,
409408 }
410409}
411-
412- fn resolve_instance_default (
413- _tcx : TyCtxt < ' tcx > ,
414- _param_env : ty:: ParamEnv < ' tcx > ,
415- _def_id : DefId ,
416- _substs : SubstsRef < ' tcx > ,
417- ) -> Option < Instance < ' tcx > > {
418- unimplemented ! ( )
419- }
420-
421- pub static RESOLVE_INSTANCE : AtomicRef <
422- for <' tcx > fn (
423- TyCtxt < ' tcx > ,
424- ty:: ParamEnv < ' tcx > ,
425- DefId ,
426- SubstsRef < ' tcx > ,
427- ) -> Option < Instance < ' tcx > > ,
428- > = AtomicRef :: new ( & ( resolve_instance_default as _ ) ) ;
0 commit comments