@@ -45,7 +45,7 @@ use rustc_errors::registry::Registry;
4545use rustc_errors:: { ColorConfig , DiagCtxt , ErrCode , FatalError , PResult , markdown} ;
4646use rustc_feature:: find_gated_cfg;
4747use rustc_interface:: util:: { self , get_codegen_backend} ;
48- use rustc_interface:: { Linker , Queries , interface, passes} ;
48+ use rustc_interface:: { Linker , interface, passes} ;
4949use rustc_lint:: unerased_lint_store;
5050use rustc_metadata:: creader:: MetadataLoader ;
5151use rustc_metadata:: locator;
@@ -158,13 +158,10 @@ pub trait Callbacks {
158158 /// Called after parsing the crate root. Submodules are not yet parsed when
159159 /// this callback is called. Return value instructs the compiler whether to
160160 /// continue the compilation afterwards (defaults to `Compilation::Continue`)
161- #[ deprecated = "This callback will likely be removed or stop giving access \
162- to the TyCtxt in the future. Use either the after_expansion \
163- or the after_analysis callback instead."]
164- fn after_crate_root_parsing<' tcx>(
161+ fn after_crate_root_parsing(
165162 & mut self ,
166163 _compiler: & interface:: Compiler ,
167- _queries: & ' tcx Queries < ' tcx> ,
164+ _queries: & ast :: Crate ,
168165 ) -> Compilation {
169166 Compilation :: Continue
170167 }
@@ -416,8 +413,9 @@ fn run_compiler(
416413 return early_exit( ) ;
417414 }
418415
419- #[ allow( deprecated) ]
420- if callbacks. after_crate_root_parsing( compiler, queries) == Compilation :: Stop {
416+ if callbacks. after_crate_root_parsing( compiler, & * queries. parse( ) . borrow( ) )
417+ == Compilation :: Stop
418+ {
421419 return early_exit( ) ;
422420 }
423421
0 commit comments