rust/tests
Matthias Krüger 104e1a4bf2
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:
213ad10c8f/compiler/rustc_hir_analysis/src/collect/generics_of.rs (L150)

r? `@BoxyUwU`
2024-05-24 23:01:11 +02:00
..
assembly test: Add assembly tests for x86_64-unknown-linux-none target 2024-05-12 01:25:11 +02:00
auxiliary
codegen Rollup merge of #125222 - Oneirical:fifth, r=jieyouxu 2024-05-23 07:41:18 +02:00
codegen-units Fix some minor issues from the ui-test auto-porting 2024-05-11 19:58:35 -04:00
coverage coverage: Simplify counter expressions using simple algebra 2024-05-14 13:58:40 +10:00
coverage-run-rustdoc
crashes Rollup merge of #125501 - compiler-errors:opaque-opaque-anon-ct, r=BoxyUwU 2024-05-24 23:01:11 +02:00
debuginfo Fix tests/debuginfo/strings-and-strs. 2024-05-20 15:01:59 +10:00
incremental Update tests/incremental/foreign.rs 2024-05-20 11:13:10 -04:00
mir-opt Rollup merge of #125173 - scottmcm:never-checked, r=davidtwco 2024-05-20 18:13:48 +02:00
pretty hir pretty: fix block indent 2024-05-20 20:30:44 +02:00
run-make Migrate run-make/rustdoc-with-output-dir-option to rmake.rs 2024-05-24 11:19:30 +02:00
run-make-fulldeps
run-pass-valgrind
rustdoc Move tests into appropriate subdirectories 2024-05-21 21:21:26 -07:00
rustdoc-gui Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomez 2024-05-07 18:12:54 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Move tests into appropriate subdirectories 2024-05-21 21:21:26 -07:00
ui Rollup merge of #125501 - compiler-errors:opaque-opaque-anon-ct, r=BoxyUwU 2024-05-24 23:01:11 +02:00
ui-fulldeps Add conversion from IntrinsicDef to FnDef 2024-05-23 15:35:18 +00:00
COMPILER_TESTS.md