rust/compiler/rustc_middle/src/query
bors d4f880f8ce Auto merge of #138499 - lcnr:borrowck-typeck_root, r=oli-obk
borrowck typeck children together with their root

This introduces new cycle errors, even with `feature(inline_const_pat)` removed, see the `non-structural-match-types-cycle-err.rs` test.

The new cycle error happens as the layout of `async`-blocks relies on their `optimized_mir`. As that now depends on `mir_borrowck` of its typeck parent, computing the layout of an `async`-block during MIR building, e.g. when evaluating a named `const` pattern. I think there's currently no way to have a named const pattern whose type references an async block while being allowed? cc `@oli-obk` `@RalfJung`

I cannot think of other cases where we currently rely on the MIR of a typeck children while borrowchecking their parent. The crater run came back without any breakage. My work here will prevent any future features which rely on this as we'll get locked into borrowchecking them together as I continue to work on https://github.com/rust-lang/types-team/issues/129, cc `@rust-lang/types.`

r? compiler-errors
2025-04-08 16:01:37 +00:00
..
arena_cached.rs Allow arena_cache queries to return Option<&'tcx T> 2025-01-23 13:25:37 +11:00
erase.rs Add TyCtx::env_var_os 2025-03-26 15:46:05 +01:00
keys.rs Move methods from Map to TyCtxt, part 5. 2025-04-02 10:00:46 +11:00
mod.rs Auto merge of #138499 - lcnr:borrowck-typeck_root, r=oli-obk 2025-04-08 16:01:37 +00:00
on_disk_cache.rs hygiene: Avoid recursion in syntax context decoding 2025-04-03 00:18:04 +03:00
plumbing.rs Avoiding calling queries when collecting active queries 2025-03-26 09:36:36 +01:00