@@ -90,7 +90,6 @@ pub struct Queries<'tcx> {
90
90
register_plugins : Query < ( ast:: Crate , Lrc < LintStore > ) > ,
91
91
expansion : Query < ( Lrc < ast:: Crate > , Rc < RefCell < BoxedResolver > > , Lrc < LintStore > ) > ,
92
92
dep_graph : Query < DepGraph > ,
93
- prepare_outputs : Query < OutputFilenames > ,
94
93
global_ctxt : Query < QueryContext < ' tcx > > ,
95
94
ongoing_codegen : Query < Box < dyn Any > > ,
96
95
}
@@ -109,7 +108,6 @@ impl<'tcx> Queries<'tcx> {
109
108
register_plugins : Default :: default ( ) ,
110
109
expansion : Default :: default ( ) ,
111
110
dep_graph : Default :: default ( ) ,
112
- prepare_outputs : Default :: default ( ) ,
113
111
global_ctxt : Default :: default ( ) ,
114
112
ongoing_codegen : Default :: default ( ) ,
115
113
}
@@ -211,32 +209,24 @@ impl<'tcx> Queries<'tcx> {
211
209
} )
212
210
}
213
211
214
- pub fn prepare_outputs ( & self ) -> Result < QueryResult < ' _ , OutputFilenames > > {
215
- self . prepare_outputs . compute ( || {
216
- let expansion = self . expansion ( ) ?;
217
- let ( krate, boxed_resolver, _) = & * expansion. borrow ( ) ;
212
+ pub fn global_ctxt ( & ' tcx self ) -> Result < QueryResult < ' _ , QueryContext < ' tcx > > > {
213
+ self . global_ctxt . compute ( || {
218
214
let crate_name = * self . crate_name ( ) ?. borrow ( ) ;
219
- passes:: prepare_outputs (
215
+ let ( krate, resolver, lint_store) = self . expansion ( ) ?. steal ( ) ;
216
+
217
+ let outputs = passes:: prepare_outputs (
220
218
self . session ( ) ,
221
219
self . compiler ,
222
- krate,
223
- & * boxed_resolver ,
220
+ & krate,
221
+ & resolver ,
224
222
crate_name,
225
- )
226
- } )
227
- }
223
+ ) ?;
228
224
229
- pub fn global_ctxt ( & ' tcx self ) -> Result < QueryResult < ' _ , QueryContext < ' tcx > > > {
230
- self . global_ctxt . compute ( || {
231
- let crate_name = * self . crate_name ( ) ?. borrow ( ) ;
232
- let outputs = self . prepare_outputs ( ) ?. steal ( ) ;
233
- let dep_graph = self . dep_graph ( ) ?. borrow ( ) . clone ( ) ;
234
- let ( krate, resolver, lint_store) = self . expansion ( ) ?. steal ( ) ;
235
225
Ok ( passes:: create_global_ctxt (
236
226
self . compiler ,
237
227
lint_store,
238
228
krate,
239
- dep_graph,
229
+ self . dep_graph ( ) ? . steal ( ) ,
240
230
resolver,
241
231
outputs,
242
232
crate_name,
0 commit comments