11use crate :: interface:: { Compiler , Result } ;
2- use crate :: passes:: { self , BoxedResolver , ExpansionResult , BoxedGlobalCtxt , PluginInfo } ;
2+ use crate :: passes:: { self , BoxedResolver , BoxedGlobalCtxt , PluginInfo } ;
33
44use rustc_incremental:: DepGraphFuture ;
55use rustc_data_structures:: sync:: Lrc ;
@@ -11,6 +11,7 @@ use rustc::session::Session;
1111use rustc:: lint:: LintStore ;
1212use rustc:: hir:: def_id:: LOCAL_CRATE ;
1313use rustc:: ty:: steal:: Steal ;
14+ use rustc:: ty:: ResolverOutputs ;
1415use rustc:: dep_graph:: DepGraph ;
1516use std:: cell:: { Ref , RefMut , RefCell } ;
1617use std:: rc:: Rc ;
@@ -81,7 +82,7 @@ pub(crate) struct Queries {
8182 register_plugins : Query < ( ast:: Crate , PluginInfo , Lrc < LintStore > ) > ,
8283 expansion : Query < ( ast:: Crate , Steal < Rc < RefCell < BoxedResolver > > > , Lrc < LintStore > ) > ,
8384 dep_graph : Query < DepGraph > ,
84- lower_to_hir : Query < ( Steal < hir:: map:: Forest > , ExpansionResult ) > ,
85+ lower_to_hir : Query < ( Steal < hir:: map:: Forest > , Steal < ResolverOutputs > ) > ,
8586 prepare_outputs : Query < OutputFilenames > ,
8687 global_ctxt : Query < BoxedGlobalCtxt > ,
8788 ongoing_codegen : Query < Box < dyn Any > > ,
@@ -191,7 +192,9 @@ impl Compiler {
191192 } )
192193 }
193194
194- pub fn lower_to_hir ( & self ) -> Result < & Query < ( Steal < hir:: map:: Forest > , ExpansionResult ) > > {
195+ pub fn lower_to_hir (
196+ & self ,
197+ ) -> Result < & Query < ( Steal < hir:: map:: Forest > , Steal < ResolverOutputs > ) > > {
195198 self . queries . lower_to_hir . compute ( || {
196199 let expansion_result = self . expansion ( ) ?;
197200 let peeked = expansion_result. peek ( ) ;
@@ -207,14 +210,14 @@ impl Compiler {
207210 & krate
208211 )
209212 } ) ?) ;
210- Ok ( ( hir, BoxedResolver :: to_expansion_result ( resolver) ) )
213+ Ok ( ( hir, Steal :: new ( BoxedResolver :: to_resolver_outputs ( resolver) ) ) )
211214 } )
212215 }
213216
214217 pub fn prepare_outputs ( & self ) -> Result < & Query < OutputFilenames > > {
215218 self . queries . prepare_outputs . compute ( || {
216219 let expansion_result = self . expansion ( ) ?;
217- let ( krate, boxed_resolver) = & * expansion_result. peek ( ) ;
220+ let ( krate, boxed_resolver, _ ) = & * expansion_result. peek ( ) ;
218221 let crate_name = self . crate_name ( ) ?;
219222 let crate_name = crate_name. peek ( ) ;
220223 passes:: prepare_outputs ( self . session ( ) , self , & krate, & boxed_resolver, & crate_name)
@@ -228,12 +231,12 @@ impl Compiler {
228231 let lint_store = self . expansion ( ) ?. peek ( ) . 2 . clone ( ) ;
229232 let hir = self . lower_to_hir ( ) ?;
230233 let hir = hir. peek ( ) ;
231- let ( ref hir_forest, ref expansion ) = * hir;
234+ let ( hir_forest, resolver_outputs ) = & * hir;
232235 Ok ( passes:: create_global_ctxt (
233236 self ,
234237 lint_store,
235238 hir_forest. steal ( ) ,
236- expansion . resolver_outputs . steal ( ) ,
239+ resolver_outputs. steal ( ) ,
237240 outputs,
238241 & crate_name) )
239242 } )
0 commit comments