@@ -1218,18 +1218,18 @@ impl<'tcx> TyCtxt<'tcx> {
1218
1218
}
1219
1219
1220
1220
pub fn lib_features ( self ) -> & ' tcx middle:: lib_features:: LibFeatures {
1221
- self . get_lib_features ( LOCAL_CRATE )
1221
+ self . get_lib_features ( ( ) )
1222
1222
}
1223
1223
1224
1224
/// Obtain all lang items of this crate and all dependencies (recursively)
1225
1225
pub fn lang_items ( self ) -> & ' tcx rustc_hir:: lang_items:: LanguageItems {
1226
- self . get_lang_items ( LOCAL_CRATE )
1226
+ self . get_lang_items ( ( ) )
1227
1227
}
1228
1228
1229
1229
/// Obtain the given diagnostic item's `DefId`. Use `is_diagnostic_item` if you just want to
1230
1230
/// compare against another `DefId`, since `is_diagnostic_item` is cheaper.
1231
1231
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 ( )
1233
1233
}
1234
1234
1235
1235
/// Check whether the diagnostic item with the given `name` has the given `DefId`.
@@ -1238,19 +1238,19 @@ impl<'tcx> TyCtxt<'tcx> {
1238
1238
}
1239
1239
1240
1240
pub fn stability ( self ) -> & ' tcx stability:: Index < ' tcx > {
1241
- self . stability_index ( LOCAL_CRATE )
1241
+ self . stability_index ( ( ) )
1242
1242
}
1243
1243
1244
1244
pub fn crates ( self ) -> & ' tcx [ CrateNum ] {
1245
- self . all_crate_nums ( LOCAL_CRATE )
1245
+ self . all_crate_nums ( ( ) )
1246
1246
}
1247
1247
1248
1248
pub fn allocator_kind ( self ) -> Option < AllocatorKind > {
1249
1249
self . cstore . allocator_kind ( )
1250
1250
}
1251
1251
1252
1252
pub fn features ( self ) -> & ' tcx rustc_feature:: Features {
1253
- self . features_query ( LOCAL_CRATE )
1253
+ self . features_query ( ( ) )
1254
1254
}
1255
1255
1256
1256
pub fn def_key ( self , id : DefId ) -> rustc_hir:: definitions:: DefKey {
@@ -2815,18 +2815,12 @@ pub fn provide(providers: &mut ty::query::Providers) {
2815
2815
tcx. stability ( ) . local_deprecation_entry ( id)
2816
2816
} ;
2817
2817
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 ( ) ) ;
2822
2819
providers. output_filenames = |tcx, cnum| {
2823
2820
assert_eq ! ( cnum, LOCAL_CRATE ) ;
2824
2821
tcx. output_filenames . clone ( )
2825
2822
} ;
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 ( ) ;
2830
2824
providers. is_panic_runtime = |tcx, cnum| {
2831
2825
assert_eq ! ( cnum, LOCAL_CRATE ) ;
2832
2826
tcx. sess . contains_name ( tcx. hir ( ) . krate_attrs ( ) , sym:: panic_runtime)
0 commit comments