os-rust/tests/ui-fulldeps/stable-mir
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
..
check_abi.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_allocation.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_attribute.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_binop.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_crate_defs.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_def_ty.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_defs.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_foreign.rs Remove feature(control_flow_enum) in tests 2024-09-25 19:00:19 -07:00
check_instance.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_intrinsics.rs Rollup merge of #132410 - bjorn3:yet_another_driver_refactor_round, r=cjgillot 2024-11-27 22:23:24 +01:00
check_item_kind.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_normalization.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_trait_queries.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_transform.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
check_ty_fold.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
compilation-result.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
crate-info.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
projections.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00
smir_internal.rs Remove feature(control_flow_enum) in tests 2024-09-25 19:00:19 -07:00
smir_serde.rs Remove feature(control_flow_enum) in tests 2024-09-25 19:00:19 -07:00
smir_visitor.rs Pass TyCtxt instead of Queries to the after_analysis callbacks 2024-11-09 18:43:29 +00:00