@@ -162,9 +162,10 @@ pub fn abort_on_err<T>(result: Result<T, ErrorGuaranteed>, sess: &Session) -> T
162
162
pub trait Callbacks {
163
163
/// Called before creating the compiler instance
164
164
fn config( & mut self , _config: & mut interface:: Config ) { }
165
- /// Called after parsing. Return value instructs the compiler whether to
165
+ /// Called after parsing the crate root. Submodules are not yet parsed when
166
+ /// this callback is called. Return value instructs the compiler whether to
166
167
/// continue the compilation afterwards (defaults to `Compilation::Continue`)
167
- fn after_parsing <' tcx>(
168
+ fn after_crate_root_parsing <' tcx>(
168
169
& mut self ,
169
170
_compiler: & interface:: Compiler ,
170
171
_queries: & ' tcx Queries <' tcx>,
@@ -184,7 +185,6 @@ pub trait Callbacks {
184
185
/// continue the compilation afterwards (defaults to `Compilation::Continue`)
185
186
fn after_analysis<' tcx>(
186
187
& mut self ,
187
- _handler: & EarlyErrorHandler ,
188
188
_compiler: & interface:: Compiler ,
189
189
_queries: & ' tcx Queries <' tcx>,
190
190
) -> Compilation {
@@ -407,7 +407,7 @@ fn run_compiler(
407
407
return early_exit( ) ;
408
408
}
409
409
410
- if callbacks. after_parsing ( compiler, queries) == Compilation :: Stop {
410
+ if callbacks. after_crate_root_parsing ( compiler, queries) == Compilation :: Stop {
411
411
return early_exit( ) ;
412
412
}
413
413
@@ -445,7 +445,7 @@ fn run_compiler(
445
445
446
446
queries. global_ctxt( ) ?. enter( |tcx| tcx. analysis( ( ) ) ) ?;
447
447
448
- if callbacks. after_analysis( & handler , compiler, queries) == Compilation :: Stop {
448
+ if callbacks. after_analysis( compiler, queries) == Compilation :: Stop {
449
449
return early_exit( ) ;
450
450
}
451
451
0 commit comments