77use rustc_data_structures:: bit_set:: BitSet ;
88use rustc_data_structures:: indexed_vec:: IndexVec ;
99use rustc_data_structures:: fx:: FxHashSet ;
10- use rustc_data_structures:: sync:: Lrc ;
1110use rustc_target:: spec:: abi:: Abi ;
1211use rustc:: hir;
1312use rustc:: hir:: def_id:: DefId ;
@@ -833,7 +832,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
833832 }
834833
835834 /// Check a whole const, static initializer or const fn.
836- fn check_const ( & mut self ) -> ( u8 , Lrc < BitSet < Local > > ) {
835+ fn check_const ( & mut self ) -> ( u8 , & ' tcx BitSet < Local > ) {
837836 debug ! ( "const-checking {} {:?}" , self . mode, self . def_id) ;
838837
839838 let mir = self . mir ;
@@ -907,8 +906,6 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
907906 }
908907 }
909908
910- let promoted_temps = Lrc :: new ( promoted_temps) ;
911-
912909 let mut qualifs = self . qualifs_in_local ( RETURN_PLACE ) ;
913910
914911 // Account for errors in consts by using the
@@ -917,7 +914,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
917914 qualifs = self . qualifs_in_any_value_of_ty ( mir. return_ty ( ) ) ;
918915 }
919916
920- ( qualifs. encode_to_bits ( ) , promoted_temps)
917+ ( qualifs. encode_to_bits ( ) , self . tcx . arena . alloc ( promoted_temps) )
921918 }
922919}
923920
@@ -1433,7 +1430,7 @@ pub fn provide(providers: &mut Providers<'_>) {
14331430
14341431fn mir_const_qualif < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
14351432 def_id : DefId )
1436- -> ( u8 , Lrc < BitSet < Local > > ) {
1433+ -> ( u8 , & ' tcx BitSet < Local > ) {
14371434 // N.B., this `borrow()` is guaranteed to be valid (i.e., the value
14381435 // cannot yet be stolen), because `mir_validated()`, which steals
14391436 // from `mir_const(), forces this query to execute before
@@ -1442,7 +1439,7 @@ fn mir_const_qualif<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
14421439
14431440 if mir. return_ty ( ) . references_error ( ) {
14441441 tcx. sess . delay_span_bug ( mir. span , "mir_const_qualif: Mir had errors" ) ;
1445- return ( 1 << IsNotPromotable :: IDX , Lrc :: new ( BitSet :: new_empty ( 0 ) ) ) ;
1442+ return ( 1 << IsNotPromotable :: IDX , tcx . arena . alloc ( BitSet :: new_empty ( 0 ) ) ) ;
14461443 }
14471444
14481445 Checker :: new ( tcx, def_id, mir, Mode :: Const ) . check_const ( )
0 commit comments