@@ -77,7 +77,7 @@ pub struct AnalysisData<'a, 'tcx: 'a> {
7777}
7878
7979fn borrowck < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , owner_def_id : DefId )
80- -> Lrc < BorrowCheckResult >
80+ -> & ' tcx BorrowCheckResult
8181{
8282 assert ! ( tcx. use_ast_borrowck( ) || tcx. migrate_borrowck( ) ) ;
8383
@@ -91,7 +91,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
9191 // those things (notably the synthesized constructors from
9292 // tuple structs/variants) do not have an associated body
9393 // and do not need borrowchecking.
94- return Lrc :: new ( BorrowCheckResult {
94+ return tcx . arena . alloc ( BorrowCheckResult {
9595 used_mut_nodes : Default :: default ( ) ,
9696 signalled_any_error : SignalledError :: NoErrorsSeen ,
9797 } )
@@ -142,7 +142,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
142142 unused:: check ( & mut bccx, body) ;
143143 }
144144
145- Lrc :: new ( BorrowCheckResult {
145+ tcx . arena . alloc ( BorrowCheckResult {
146146 used_mut_nodes : bccx. used_mut_nodes . into_inner ( ) ,
147147 signalled_any_error : bccx. signalled_any_error . into_inner ( ) ,
148148 } )
0 commit comments