about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-11-27 22:23:24 +0100
committerGitHub <noreply@github.com>2024-11-27 22:23:24 +0100
commitaf1ca153d4aed5ffe22445273aa388a8d3f8f4ae (patch)
tree314ed440cb0f9e4d9f5082a19bf4f6fe5f755183 /compiler/rustc_codegen_gcc
parent6b6a867ae9eac4e78d041ac4ee84be1072a48cf7 (diff)
parentdc65c6317a601dbc254d75df4fdf54aee6fbb01f (diff)
downloadrust-af1ca153d4aed5ffe22445273aa388a8d3f8f4ae.tar.gz
rust-af1ca153d4aed5ffe22445273aa388a8d3f8f4ae.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions