diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-24 23:01:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-24 23:01:11 +0200 |
| commit | 104e1a4bf2395fb1ad107cb102920fba9e11ed7e (patch) | |
| tree | 09833778bd6e1d215b1e3e5829279d1be52806d7 /library/std/src/sys/pal/unix/stack_overflow.rs | |
| parent | 363fbb967ef5d833323994a5b6d17b06297f3bdd (diff) | |
| parent | de517b79bc417caa507d598824ae869fe4f7c74e (diff) | |
| download | rust-104e1a4bf2395fb1ad107cb102920fba9e11ed7e.tar.gz rust-104e1a4bf2395fb1ad107cb102920fba9e11ed7e.zip | |
Rollup merge of #125501 - compiler-errors:opaque-opaque-anon-ct, r=BoxyUwU
Resolve anon const's parent predicates to direct parent instead of opaque's parent When an anon const is inside of an opaque, #99801 added a hack to resolve the anon const's parent predicates *not* to the opaque's predicates, but to the opaque's *parent's* predicates. This is insufficient when considering nested opaques. This means that the `predicates_of` an anon const might reference duplicated lifetimes (installed by `compute_bidirectional_outlives_predicates`) when computing known outlives in MIR borrowck, leading to these ICEs: Fixes #121574 Fixes #118403 ~~Instead, we should be using the `OpaqueTypeOrigin` to acquire the owner item (fn/type alias/etc) of the opaque, whose predicates we're fine to mention.~~ ~~I think it's a bit sketchy that we're doing this at all, tbh; I think it *should* be fine for the anon const to inherit the predicates of the opaque it's located inside. However, that would also mean that we need to make sure the `generics_of` that anon const line up in the same way.~~ ~~None of this is important to solve right now; I just want to fix these ICEs so we can land #125468, which accidentally fixes these issues in a different and unrelated way.~~ edit: We don't need this special case anyways because we install the right parent item in `generics_of` anyways: https://github.com/rust-lang/rust/blob/213ad10c8f0fc275648552366275dc4e07f97462/compiler/rustc_hir_analysis/src/collect/generics_of.rs#L150 r? `@BoxyUwU`
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
