rust/tests
Guillaume Gomez 1b08d1a92c
Rollup merge of #121702 - compiler-errors:coerce-alias-relate, r=lcnr
Process alias-relate obligations in CoerceUnsized loop

After #119106, we now emit `AliasRelate` goals when relating `?0` and `Alias<T, ..>` in the new solver. In the ad-hoc `CoerceUnsized` selection loop, we now may have `AliasRelate` goals which must be processed to constrain type variables which are mentioned in other goals.

---

For example, in the included test, we try to coerce `&<ManuallyDrop<T> as Deref>::Target` to `&dyn Foo`. This requires proving:
* 1 `&<ManuallyDrop<T> as Deref>::Target: CoerceUnsized<&dyn Foo>`
    * 2 `<ManuallyDrop<T> as Deref>::Target alias-relate ?0`
    * 3 `?0: Unsize<dyn Foo>`
        * 4 `?0: Foo`
        * 5 `?0: Sized`

If we don't process goal (2.) before processing goal (3.), then we hit ambiguity since `?0` is never constrained, and therefore we bail out, refusing to coerce the types. After processing (2.), we know `?0 := T`, and the rest of the goals can be processed normally.
2024-02-28 16:04:54 +01:00
..
assembly Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
auxiliary
codegen Auto merge of #121655 - matthiaskrgr:rollup-qpx3kks, r=matthiaskrgr 2024-02-27 00:55:14 +00:00
codegen-units [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coverage-run-rustdoc [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
debuginfo Use generic NonZero in tests. 2024-02-25 12:03:48 +01:00
incremental fix use of platform_intrinsics in tests 2024-02-25 08:15:44 +01:00
mir-opt Use generic NonZero in tests. 2024-02-25 12:03:48 +01:00
pretty Re-bless tests/pretty 2024-02-22 16:04:05 +00:00
run-make Rollup merge of #121598 - RalfJung:catch_unwind, r=oli-obk 2024-02-27 00:40:00 +01:00
run-make-fulldeps Make CodegenBackend::join_codegen infallible. 2024-02-17 10:51:35 +11:00
run-pass-valgrind [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc Rollup merge of #121680 - GuillaumeGomez:foreign-macro-jump-to-def, r=notriddle 2024-02-28 16:04:52 +01:00
rustdoc-gui [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-js [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-js-std
rustdoc-json [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-ui [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
ui Rollup merge of #121702 - compiler-errors:coerce-alias-relate, r=lcnr 2024-02-28 16:04:54 +01:00
ui-fulldeps [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
COMPILER_TESTS.md