@@ -45,7 +45,7 @@ use rustc_errors::registry::Registry;
45
45
use rustc_errors:: { ColorConfig , DiagCtxt , ErrCode , FatalError , PResult , markdown} ;
46
46
use rustc_feature:: find_gated_cfg;
47
47
use rustc_interface:: util:: { self , get_codegen_backend} ;
48
- use rustc_interface:: { Linker , Queries , interface, passes} ;
48
+ use rustc_interface:: { Linker , interface, passes} ;
49
49
use rustc_lint:: unerased_lint_store;
50
50
use rustc_metadata:: creader:: MetadataLoader ;
51
51
use rustc_metadata:: locator;
@@ -158,13 +158,10 @@ pub trait Callbacks {
158
158
/// Called after parsing the crate root. Submodules are not yet parsed when
159
159
/// this callback is called. Return value instructs the compiler whether to
160
160
/// 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(
165
162
& mut self ,
166
163
_compiler: & interface:: Compiler ,
167
- _queries: & ' tcx Queries < ' tcx> ,
164
+ _queries: & ast :: Crate ,
168
165
) -> Compilation {
169
166
Compilation :: Continue
170
167
}
@@ -416,8 +413,9 @@ fn run_compiler(
416
413
return early_exit( ) ;
417
414
}
418
415
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
+ {
421
419
return early_exit( ) ;
422
420
}
423
421
0 commit comments