Skip to content

Commit aaf0567

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 aaf0567

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

compiler/rustc_driver_impl/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ 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 or stop giving access \
161+
to the TyCtxt in the future. Use either the after_expansion \
162+
or the after_analysis callback instead."]
160163
fn after_crate_root_parsing<'tcx>(
161164
&mut self,
162165
_compiler: &interface::Compiler,

0 commit comments

Comments
 (0)