Skip to content

Commit b17abaa

Browse files
committed
Deprecate the after_crate_root_parsing callback
Several custom drivers are incorrectly calling queries.global_ctxt() from inside of it, which causes some driver code to be skipped. As such I would like to either remove it in the future or if custom drivers still need it, change it to accept an &rustc_ast::Crate instead.
1 parent d1b8dbb commit b17abaa

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+2
-0
lines changed

compiler/rustc_driver_impl/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ pub trait Callbacks {
157157
/// Called after parsing the crate root. Submodules are not yet parsed when
158158
/// this callback is called. Return value instructs the compiler whether to
159159
/// continue the compilation afterwards (defaults to `Compilation::Continue`)
160+
#[deprecated = "This callback will likely be removed in the future. Use either \
161+
the after_expansion or the after_analysis callback instead."]
160162
fn after_crate_root_parsing<'tcx>(
161163
&mut self,
162164
_compiler: &interface::Compiler,

0 commit comments

Comments
 (0)