@@ -13,7 +13,6 @@ use rustc_ast::{self as ast, visit};
1313use rustc_borrowck as mir_borrowck;
1414use rustc_codegen_ssa:: traits:: CodegenBackend ;
1515use rustc_data_structures:: parallel;
16- use rustc_data_structures:: steal:: Steal ;
1716use rustc_data_structures:: sync:: { Lrc , OnceCell , WorkerLocal } ;
1817use rustc_errors:: { ErrorGuaranteed , PResult } ;
1918use rustc_expand:: base:: { ExtCtxt , LintStoreExpand , ResolverExpand } ;
@@ -31,7 +30,7 @@ use rustc_plugin_impl as plugin;
3130use rustc_query_impl:: { OnDiskCache , Queries as TcxQueries } ;
3231use rustc_resolve:: { Resolver , ResolverArenas } ;
3332use rustc_session:: config:: { CrateType , Input , OutputFilenames , OutputType } ;
34- use rustc_session:: cstore:: { MetadataLoader , MetadataLoaderDyn } ;
33+ use rustc_session:: cstore:: { MetadataLoader , MetadataLoaderDyn , Untracked } ;
3534use rustc_session:: output:: filename_for_input;
3635use rustc_session:: search_paths:: PathKind ;
3736use rustc_session:: { Limit , Session } ;
@@ -775,11 +774,8 @@ impl<'tcx> QueryContext<'tcx> {
775774pub fn create_global_ctxt < ' tcx > (
776775 compiler : & ' tcx Compiler ,
777776 lint_store : Lrc < LintStore > ,
778- krate : Lrc < ast:: Crate > ,
779777 dep_graph : DepGraph ,
780- resolver : Rc < RefCell < BoxedResolver > > ,
781- outputs : OutputFilenames ,
782- crate_name : Symbol ,
778+ untracked : Untracked ,
783779 queries : & ' tcx OnceCell < TcxQueries < ' tcx > > ,
784780 global_ctxt : & ' tcx OnceCell < GlobalCtxt < ' tcx > > ,
785781 arena : & ' tcx WorkerLocal < Arena < ' tcx > > ,
@@ -790,8 +786,6 @@ pub fn create_global_ctxt<'tcx>(
790786 // incr. comp. yet.
791787 dep_graph. assert_ignored ( ) ;
792788
793- let resolver_outputs = BoxedResolver :: to_resolver_outputs ( resolver) ;
794-
795789 let sess = & compiler. session ( ) ;
796790 let query_result_on_disk_cache = rustc_incremental:: load_query_result_cache ( sess) ;
797791
@@ -810,12 +804,6 @@ pub fn create_global_ctxt<'tcx>(
810804 TcxQueries :: new ( local_providers, extern_providers, query_result_on_disk_cache)
811805 } ) ;
812806
813- let ty:: ResolverOutputs {
814- global_ctxt : untracked_resolutions,
815- ast_lowering : untracked_resolver_for_lowering,
816- untracked,
817- } = resolver_outputs;
818-
819807 let gcx = sess. time ( "setup_global_ctxt" , || {
820808 global_ctxt. get_or_init ( move || {
821809 TyCtxt :: create_global_ctxt (
@@ -832,19 +820,7 @@ pub fn create_global_ctxt<'tcx>(
832820 } )
833821 } ) ;
834822
835- let mut qcx = QueryContext { gcx } ;
836- qcx. enter ( |tcx| {
837- let feed = tcx. feed_unit_query ( ) ;
838- feed. resolver_for_lowering (
839- tcx. arena . alloc ( Steal :: new ( ( untracked_resolver_for_lowering, krate) ) ) ,
840- ) ;
841- feed. resolutions ( tcx. arena . alloc ( untracked_resolutions) ) ;
842- feed. output_filenames ( tcx. arena . alloc ( std:: sync:: Arc :: new ( outputs) ) ) ;
843- feed. features_query ( sess. features_untracked ( ) ) ;
844- let feed = tcx. feed_local_crate ( ) ;
845- feed. crate_name ( crate_name) ;
846- } ) ;
847- qcx
823+ QueryContext { gcx }
848824}
849825
850826/// Runs the resolution, type-checking, region checking and other
0 commit comments