diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-12-12 11:14:51 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-12-12 11:14:51 +0000 |
| commit | 21634cb59d5a9c8386f3d5fccc6c2e96e80eaab3 (patch) | |
| tree | 5c44474d8de1f890250b49cd48b818eb44ad4629 /compiler/rustc_driver_impl/src | |
| parent | b795264daa2d411fa232a3de51cc4b0ef8c86a33 (diff) | |
| download | rust-21634cb59d5a9c8386f3d5fccc6c2e96e80eaab3.tar.gz rust-21634cb59d5a9c8386f3d5fccc6c2e96e80eaab3.zip | |
Pass rustc_ast::Crate rather than Queries to after_crate_root_parsing
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index f5fdf432e18..fe4e822ce0d 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -45,7 +45,7 @@ use rustc_errors::registry::Registry; use rustc_errors::{ColorConfig, DiagCtxt, ErrCode, FatalError, PResult, markdown}; use rustc_feature::find_gated_cfg; use rustc_interface::util::{self, get_codegen_backend}; -use rustc_interface::{Linker, Queries, interface, passes}; +use rustc_interface::{Linker, interface, passes}; use rustc_lint::unerased_lint_store; use rustc_metadata::creader::MetadataLoader; use rustc_metadata::locator; @@ -158,13 +158,10 @@ 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 or stop giving access \ - to the TyCtxt in the future. Use either the after_expansion \ - or the after_analysis callback instead."] - fn after_crate_root_parsing<'tcx>( + fn after_crate_root_parsing( &mut self, _compiler: &interface::Compiler, - _queries: &'tcx Queries<'tcx>, + _queries: &ast::Crate, ) -> Compilation { Compilation::Continue } @@ -416,8 +413,9 @@ fn run_compiler( return early_exit(); } - #[allow(deprecated)] - if callbacks.after_crate_root_parsing(compiler, queries) == Compilation::Stop { + if callbacks.after_crate_root_parsing(compiler, &*queries.parse().borrow()) + == Compilation::Stop + { return early_exit(); } |
