@@ -1376,11 +1376,11 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
13761376 self . sess . consider_optimizing ( & cname, msg)
13771377 }
13781378
1379- pub fn lib_features ( self ) -> Lrc < middle:: lib_features:: LibFeatures > {
1379+ pub fn lib_features ( self ) -> & ' gcx middle:: lib_features:: LibFeatures {
13801380 self . get_lib_features ( LOCAL_CRATE )
13811381 }
13821382
1383- pub fn lang_items ( self ) -> Lrc < middle:: lang_items:: LanguageItems > {
1383+ pub fn lang_items ( self ) -> & ' gcx middle:: lang_items:: LanguageItems {
13841384 self . get_lang_items ( LOCAL_CRATE )
13851385 }
13861386
@@ -3060,19 +3060,19 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
30603060 } ;
30613061 providers. get_lib_features = |tcx, id| {
30623062 assert_eq ! ( id, LOCAL_CRATE ) ;
3063- Lrc :: new ( middle:: lib_features:: collect ( tcx) )
3063+ tcx . arena . alloc ( middle:: lib_features:: collect ( tcx) )
30643064 } ;
30653065 providers. get_lang_items = |tcx, id| {
30663066 assert_eq ! ( id, LOCAL_CRATE ) ;
3067- Lrc :: new ( middle:: lang_items:: collect ( tcx) )
3067+ tcx . arena . alloc ( middle:: lang_items:: collect ( tcx) )
30683068 } ;
30693069 providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . map ( |v| & v[ ..] ) ;
30703070 providers. maybe_unused_trait_import = |tcx, id| {
30713071 tcx. maybe_unused_trait_imports . contains ( & id)
30723072 } ;
30733073 providers. maybe_unused_extern_crates = |tcx, cnum| {
30743074 assert_eq ! ( cnum, LOCAL_CRATE ) ;
3075- Lrc :: new ( tcx. maybe_unused_extern_crates . clone ( ) )
3075+ & tcx. maybe_unused_extern_crates [ .. ]
30763076 } ;
30773077 providers. names_imported_by_glob_use = |tcx, id| {
30783078 assert_eq ! ( id. krate, LOCAL_CRATE ) ;
@@ -3103,7 +3103,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
31033103 } ;
31043104 providers. postorder_cnums = |tcx, cnum| {
31053105 assert_eq ! ( cnum, LOCAL_CRATE ) ;
3106- Lrc :: new ( tcx. cstore . postorder_cnums_untracked ( ) )
3106+ tcx . arena . alloc_slice ( & tcx. cstore . postorder_cnums_untracked ( ) )
31073107 } ;
31083108 providers. output_filenames = |tcx, cnum| {
31093109 assert_eq ! ( cnum, LOCAL_CRATE ) ;
0 commit comments