@@ -2,7 +2,6 @@ use crate::middle::codegen_fn_attrs::CodegenFnAttrFlags;
2
2
use crate :: middle:: lang_items:: DropInPlaceFnLangItem ;
3
3
use crate :: ty:: print:: { FmtPrinter , Printer } ;
4
4
use crate :: ty:: { self , SubstsRef , Ty , TyCtxt , TypeFoldable } ;
5
- use rustc_data_structures:: AtomicRef ;
6
5
use rustc_hir:: def:: Namespace ;
7
6
use rustc_hir:: def_id:: { CrateNum , DefId } ;
8
7
use rustc_macros:: HashStable ;
@@ -279,7 +278,7 @@ impl<'tcx> Instance<'tcx> {
279
278
def_id : DefId ,
280
279
substs : SubstsRef < ' tcx > ,
281
280
) -> Option < Instance < ' tcx > > {
282
- ( * RESOLVE_INSTANCE ) ( tcx , param_env, def_id, substs)
281
+ tcx . resolve_instance ( ( param_env, def_id, substs) )
283
282
}
284
283
285
284
pub fn resolve_for_fn_ptr (
@@ -408,21 +407,3 @@ fn needs_fn_once_adapter_shim(
408
407
( ty:: ClosureKind :: FnMut , _) | ( ty:: ClosureKind :: FnOnce , _) => Err ( ( ) ) ,
409
408
}
410
409
}
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