rust/compiler/rustc_monomorphize/src
Matthias Krüger 27f1f4d27b
Rollup merge of #139818 - compiler-errors:normalize-tails, r=oli-obk
Normalize ADT field in `find_tails_for_unsizing`

See the comment inline and in the test.

TL;DR is that we're getting getting a type from a `type_of` query and then matching on it structurally in codegen, so we're obligated to normalize it. The fact that this wasn't triggered earlier is that all of the types that have `CoerceUnsized` implementations never encounter aliases when peeling the ADT down to their base reference/ptr type.

**NOTE**: I also renamed some things and reorganized the function a bit.

Fixes #139812
Fixes #74451, which I didn't think was interesting enough to add another test.

r? oli-obk
2025-04-15 21:16:03 +02:00
..
mono_checks Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
partitioning Remove some dead code 2025-03-11 08:41:15 +00:00
collector.rs Normalize ADT fields in find_tails_for_unsizing 2025-04-14 16:51:00 +00:00
errors.rs Make missing optimized MIR error more informative 2025-04-01 09:25:12 +00:00
lib.rs Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
partitioning.rs Fix binding mode problems 2025-02-22 00:13:19 +00:00
util.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00