@@ -1376,11 +1376,11 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1376
1376
self . sess . consider_optimizing ( & cname, msg)
1377
1377
}
1378
1378
1379
- pub fn lib_features ( self ) -> Lrc < middle:: lib_features:: LibFeatures > {
1379
+ pub fn lib_features ( self ) -> & ' gcx middle:: lib_features:: LibFeatures {
1380
1380
self . get_lib_features ( LOCAL_CRATE )
1381
1381
}
1382
1382
1383
- pub fn lang_items ( self ) -> Lrc < middle:: lang_items:: LanguageItems > {
1383
+ pub fn lang_items ( self ) -> & ' gcx middle:: lang_items:: LanguageItems {
1384
1384
self . get_lang_items ( LOCAL_CRATE )
1385
1385
}
1386
1386
@@ -3060,19 +3060,19 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
3060
3060
} ;
3061
3061
providers. get_lib_features = |tcx, id| {
3062
3062
assert_eq ! ( id, LOCAL_CRATE ) ;
3063
- Lrc :: new ( middle:: lib_features:: collect ( tcx) )
3063
+ tcx . arena . alloc ( middle:: lib_features:: collect ( tcx) )
3064
3064
} ;
3065
3065
providers. get_lang_items = |tcx, id| {
3066
3066
assert_eq ! ( id, LOCAL_CRATE ) ;
3067
- Lrc :: new ( middle:: lang_items:: collect ( tcx) )
3067
+ tcx . arena . alloc ( middle:: lang_items:: collect ( tcx) )
3068
3068
} ;
3069
3069
providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . map ( |v| & v[ ..] ) ;
3070
3070
providers. maybe_unused_trait_import = |tcx, id| {
3071
3071
tcx. maybe_unused_trait_imports . contains ( & id)
3072
3072
} ;
3073
3073
providers. maybe_unused_extern_crates = |tcx, cnum| {
3074
3074
assert_eq ! ( cnum, LOCAL_CRATE ) ;
3075
- Lrc :: new ( tcx. maybe_unused_extern_crates . clone ( ) )
3075
+ & tcx. maybe_unused_extern_crates [ .. ]
3076
3076
} ;
3077
3077
providers. names_imported_by_glob_use = |tcx, id| {
3078
3078
assert_eq ! ( id. krate, LOCAL_CRATE ) ;
@@ -3103,7 +3103,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
3103
3103
} ;
3104
3104
providers. postorder_cnums = |tcx, cnum| {
3105
3105
assert_eq ! ( cnum, LOCAL_CRATE ) ;
3106
- Lrc :: new ( tcx. cstore . postorder_cnums_untracked ( ) )
3106
+ tcx . arena . alloc_slice ( & tcx. cstore . postorder_cnums_untracked ( ) )
3107
3107
} ;
3108
3108
providers. output_filenames = |tcx, cnum| {
3109
3109
assert_eq ! ( cnum, LOCAL_CRATE ) ;
0 commit comments