@@ -1218,18 +1218,18 @@ impl<'tcx> TyCtxt<'tcx> {
12181218 }
12191219
12201220 pub fn lib_features ( self ) -> & ' tcx middle:: lib_features:: LibFeatures {
1221- self . get_lib_features ( LOCAL_CRATE )
1221+ self . get_lib_features ( ( ) )
12221222 }
12231223
12241224 /// Obtain all lang items of this crate and all dependencies (recursively)
12251225 pub fn lang_items ( self ) -> & ' tcx rustc_hir:: lang_items:: LanguageItems {
1226- self . get_lang_items ( LOCAL_CRATE )
1226+ self . get_lang_items ( ( ) )
12271227 }
12281228
12291229 /// Obtain the given diagnostic item's `DefId`. Use `is_diagnostic_item` if you just want to
12301230 /// compare against another `DefId`, since `is_diagnostic_item` is cheaper.
12311231 pub fn get_diagnostic_item ( self , name : Symbol ) -> Option < DefId > {
1232- self . all_diagnostic_items ( LOCAL_CRATE ) . get ( & name) . copied ( )
1232+ self . all_diagnostic_items ( ( ) ) . get ( & name) . copied ( )
12331233 }
12341234
12351235 /// Check whether the diagnostic item with the given `name` has the given `DefId`.
@@ -1238,19 +1238,19 @@ impl<'tcx> TyCtxt<'tcx> {
12381238 }
12391239
12401240 pub fn stability ( self ) -> & ' tcx stability:: Index < ' tcx > {
1241- self . stability_index ( LOCAL_CRATE )
1241+ self . stability_index ( ( ) )
12421242 }
12431243
12441244 pub fn crates ( self ) -> & ' tcx [ CrateNum ] {
1245- self . all_crate_nums ( LOCAL_CRATE )
1245+ self . all_crate_nums ( ( ) )
12461246 }
12471247
12481248 pub fn allocator_kind ( self ) -> Option < AllocatorKind > {
12491249 self . cstore . allocator_kind ( )
12501250 }
12511251
12521252 pub fn features ( self ) -> & ' tcx rustc_feature:: Features {
1253- self . features_query ( LOCAL_CRATE )
1253+ self . features_query ( ( ) )
12541254 }
12551255
12561256 pub fn def_key ( self , id : DefId ) -> rustc_hir:: definitions:: DefKey {
@@ -2815,18 +2815,12 @@ pub fn provide(providers: &mut ty::query::Providers) {
28152815 tcx. stability ( ) . local_deprecation_entry ( id)
28162816 } ;
28172817 providers. extern_mod_stmt_cnum = |tcx, id| tcx. extern_crate_map . get ( & id) . cloned ( ) ;
2818- providers. all_crate_nums = |tcx, cnum| {
2819- assert_eq ! ( cnum, LOCAL_CRATE ) ;
2820- tcx. arena . alloc_slice ( & tcx. cstore . crates_untracked ( ) )
2821- } ;
2818+ providers. all_crate_nums = |tcx, ( ) | tcx. arena . alloc_slice ( & tcx. cstore . crates_untracked ( ) ) ;
28222819 providers. output_filenames = |tcx, cnum| {
28232820 assert_eq ! ( cnum, LOCAL_CRATE ) ;
28242821 tcx. output_filenames . clone ( )
28252822 } ;
2826- providers. features_query = |tcx, cnum| {
2827- assert_eq ! ( cnum, LOCAL_CRATE ) ;
2828- tcx. sess . features_untracked ( )
2829- } ;
2823+ providers. features_query = |tcx, ( ) | tcx. sess . features_untracked ( ) ;
28302824 providers. is_panic_runtime = |tcx, cnum| {
28312825 assert_eq ! ( cnum, LOCAL_CRATE ) ;
28322826 tcx. sess . contains_name ( tcx. hir ( ) . krate_attrs ( ) , sym:: panic_runtime)
0 commit comments