Skip to content

Commit

Permalink
Deprecate the after_crate_root_parsing callback
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bjorn3 committed Oct 31, 2024
1 parent d1b8dbb commit b17abaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ pub trait Callbacks {
/// Called after parsing the crate root. Submodules are not yet parsed when
/// this callback is called. Return value instructs the compiler whether to
/// continue the compilation afterwards (defaults to `Compilation::Continue`)
#[deprecated = "This callback will likely be removed in the future. Use either \
the after_expansion or the after_analysis callback instead."]
fn after_crate_root_parsing<'tcx>(
&mut self,
_compiler: &interface::Compiler,
Expand Down

0 comments on commit b17abaa

Please sign in to comment.