rust/compiler/rustc_middle/src
Matthias Krüger af1ca153d4
Rollup merge of #132410 - bjorn3:yet_another_driver_refactor_round, r=cjgillot
Some more refactorings towards removing driver queries

Follow up to https://github.com/rust-lang/rust/pull/127184

## Custom driver breaking change

The `after_analysis` callback is changed to accept `TyCtxt` instead of `Queries`. The only safe query in `Queries` to call at this point is `global_ctxt()` which allows you to enter the `TyCtxt` either way. To fix your custom driver, replace the `queries: &'tcx Queries<'tcx>` argument with `tcx: TyCtxt<'tcx>` and remove your `queries.global_ctxt().unwrap().enter(|tcx| { ... })` call and only keep the contents of the closure.

## Custom driver deprecation

The `after_crate_root_parsing` callback is now deprecated. 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.
2024-11-27 22:23:24 +01:00
..
dep_graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir Refactor where predicates, and reserve for attributes support 2024-11-25 16:38:35 +08:00
hooks Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
infer Remove associated type based effects logic 2024-10-24 09:46:36 +00:00
middle Pretty print AsyncFn traits too 2024-11-22 16:55:28 +00:00
mir remove remaining references to Reveal 2024-11-23 13:52:56 +01:00
query rebase 2024-11-23 13:52:57 +01:00
thir Unify expanded constants and named constants in PatKind 2024-11-17 23:40:00 +00:00
traits global old solver cache: use TypingEnv 2024-11-23 13:52:56 +01:00
ty Rollup merge of #132410 - bjorn3:yet_another_driver_refactor_round, r=cjgillot 2024-11-27 22:23:24 +01:00
util use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
arena.rs compiler: Directly use rustc_abi in metadata and middle 2024-11-03 13:38:47 -08:00
error.rs Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
lib.rs move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
lint.rs lints_that_dont_need_to_run: never skip future-compat-reported lints 2024-11-19 22:04:10 +01:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Auto merge of #133261 - matthiaskrgr:rollup-ekui4we, r=matthiaskrgr 2024-11-20 21:58:38 +00:00
values.rs compiler: Directly use rustc_abi in metadata and middle 2024-11-03 13:38:47 -08:00