@@ -77,7 +77,7 @@ pub struct AnalysisData<'a, 'tcx: 'a> {
77
77
}
78
78
79
79
fn borrowck < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , owner_def_id : DefId )
80
- -> Lrc < BorrowCheckResult >
80
+ -> & ' tcx BorrowCheckResult
81
81
{
82
82
assert ! ( tcx. use_ast_borrowck( ) || tcx. migrate_borrowck( ) ) ;
83
83
@@ -91,7 +91,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
91
91
// those things (notably the synthesized constructors from
92
92
// tuple structs/variants) do not have an associated body
93
93
// and do not need borrowchecking.
94
- return Lrc :: new ( BorrowCheckResult {
94
+ return tcx . arena . alloc ( BorrowCheckResult {
95
95
used_mut_nodes : Default :: default ( ) ,
96
96
signalled_any_error : SignalledError :: NoErrorsSeen ,
97
97
} )
@@ -142,7 +142,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
142
142
unused:: check ( & mut bccx, body) ;
143
143
}
144
144
145
- Lrc :: new ( BorrowCheckResult {
145
+ tcx . arena . alloc ( BorrowCheckResult {
146
146
used_mut_nodes : bccx. used_mut_nodes . into_inner ( ) ,
147
147
signalled_any_error : bccx. signalled_any_error . into_inner ( ) ,
148
148
} )
0 commit comments