rust/compiler/rustc_middle/src
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
..
dep_graph Add a dep kind for use of the anon node with zero dependencies 2025-04-02 07:35:05 +02:00
hir Rollup merge of #139232 - nnethercote:remove-Map-5, r=Zalathar 2025-04-02 22:52:46 +09:00
hooks Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00
infer Clean up trivial traversal/lift impl generator macro calls. 2025-02-06 13:31:43 +11:00
middle Make LevelAndSource a struct 2025-04-03 09:17:55 +00:00
mir move ClosureRegionRequirements to rustc_borrowck 2025-04-08 00:34:40 +02:00
query Auto merge of #138499 - lcnr:borrowck-typeck_root, r=oli-obk 2025-04-08 16:01:37 +00:00
thir Add {ast,hir,thir}::PatKind::Missing variants. 2025-03-28 09:18:57 +11:00
traits Rollup merge of #138176 - compiler-errors:rigid-sized-obl, r=lcnr 2025-03-31 14:36:20 +02:00
ty borrowck typeck children together with their parent 2025-04-08 00:34:40 +02:00
util Remove attribute #[rustc_error] 2025-03-30 01:32:21 +03:00
arena.rs borrowck typeck children together with their parent 2025-04-08 00:34:40 +02:00
error.rs Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
lib.rs Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
lint.rs Remove LintExpectationId from Level variants 2025-04-03 09:22:21 +00:00
macros.rs Fold visit into ty 2025-03-15 06:34:36 +00:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Rollup merge of #139108 - Nadrieril:simplify-expandedconstant, r=oli-obk 2025-04-07 22:29:18 +10:00
values.rs Avoiding calling queries when collecting active queries 2025-03-26 09:36:36 +01:00