@@ -32,7 +32,6 @@ use std::borrow::Cow;
32
32
use std:: cell:: { Cell , RefCell } ;
33
33
use std:: fmt;
34
34
use std:: rc:: Rc ;
35
- use rustc_data_structures:: sync:: Lrc ;
36
35
use std:: hash:: { Hash , Hasher } ;
37
36
use syntax:: source_map:: CompilerDesugaringKind ;
38
37
use syntax_pos:: { MultiSpan , Span } ;
@@ -77,7 +76,7 @@ pub struct AnalysisData<'a, 'tcx: 'a> {
77
76
}
78
77
79
78
fn borrowck < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , owner_def_id : DefId )
80
- -> Lrc < BorrowCheckResult >
79
+ -> & ' tcx BorrowCheckResult
81
80
{
82
81
assert ! ( tcx. use_ast_borrowck( ) || tcx. migrate_borrowck( ) ) ;
83
82
@@ -91,7 +90,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
91
90
// those things (notably the synthesized constructors from
92
91
// tuple structs/variants) do not have an associated body
93
92
// and do not need borrowchecking.
94
- return Lrc :: new ( BorrowCheckResult {
93
+ return tcx . arena . alloc ( BorrowCheckResult {
95
94
used_mut_nodes : Default :: default ( ) ,
96
95
signalled_any_error : SignalledError :: NoErrorsSeen ,
97
96
} )
@@ -142,7 +141,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
142
141
unused:: check ( & mut bccx, body) ;
143
142
}
144
143
145
- Lrc :: new ( BorrowCheckResult {
144
+ tcx . arena . alloc ( BorrowCheckResult {
146
145
used_mut_nodes : bccx. used_mut_nodes . into_inner ( ) ,
147
146
signalled_any_error : bccx. signalled_any_error . into_inner ( ) ,
148
147
} )
0 commit comments