@@ -21,7 +21,6 @@ use rustc_span::symbol::sym;
21
21
use rustc_span:: Symbol ;
22
22
use std:: any:: Any ;
23
23
use std:: cell:: { RefCell , RefMut } ;
24
- use std:: rc:: Rc ;
25
24
use std:: sync:: Arc ;
26
25
27
26
/// Represent the result of a query.
@@ -88,7 +87,7 @@ pub struct Queries<'tcx> {
88
87
parse : Query < ast:: Crate > ,
89
88
crate_name : Query < Symbol > ,
90
89
register_plugins : Query < ( ast:: Crate , Lrc < LintStore > ) > ,
91
- expansion : Query < ( Lrc < ast:: Crate > , Rc < RefCell < BoxedResolver > > , Lrc < LintStore > ) > ,
90
+ expansion : Query < ( Lrc < ast:: Crate > , BoxedResolver , Lrc < LintStore > ) > ,
92
91
dep_graph : Query < DepGraph > ,
93
92
// This just points to what's in `gcx_cell`.
94
93
gcx : Query < & ' tcx GlobalCtxt < ' tcx > > ,
@@ -171,8 +170,7 @@ impl<'tcx> Queries<'tcx> {
171
170
172
171
pub fn expansion (
173
172
& self ,
174
- ) -> Result < QueryResult < ' _ , ( Lrc < ast:: Crate > , Rc < RefCell < BoxedResolver > > , Lrc < LintStore > ) > >
175
- {
173
+ ) -> Result < QueryResult < ' _ , ( Lrc < ast:: Crate > , BoxedResolver , Lrc < LintStore > ) > > {
176
174
trace ! ( "expansion" ) ;
177
175
self . expansion . compute ( || {
178
176
let crate_name = * self . crate_name ( ) ?. borrow ( ) ;
@@ -188,7 +186,7 @@ impl<'tcx> Queries<'tcx> {
188
186
let krate = resolver. access ( |resolver| {
189
187
passes:: configure_and_expand ( sess, & lint_store, krate, crate_name, resolver)
190
188
} ) ?;
191
- Ok ( ( Lrc :: new ( krate) , Rc :: new ( RefCell :: new ( resolver) ) , lint_store) )
189
+ Ok ( ( Lrc :: new ( krate) , resolver, lint_store) )
192
190
} )
193
191
}
194
192
@@ -217,7 +215,7 @@ impl<'tcx> Queries<'tcx> {
217
215
untracked,
218
216
global_ctxt : untracked_resolutions,
219
217
ast_lowering : untracked_resolver_for_lowering,
220
- } = BoxedResolver :: to_resolver_outputs ( resolver) ;
218
+ } = resolver. into_outputs ( ) ;
221
219
222
220
let gcx = passes:: create_global_ctxt (
223
221
self . compiler ,
0 commit comments