rust/tests
León Orell Valerian Liehr dc81f6d549
Rollup merge of #123794 - oli-obk:define_opaque_types2, r=lcnr
More DefineOpaqueTypes::Yes

This accepts more code on stable. It is now possible to have match arms return a function item `foo::<ConcreteType>` and a function item `foo::<OpaqueTypeInDefiningScope>` in another, and that will constrain `OpaqueTypeInDefiningScope` to have the hidden type `ConcreteType`. So the following function will now compile, but on master it errors with a type mismatch on the second match arm

```rust
// The function item whose generic params we want to merge.
fn foo<T>(t: T) -> T { t }
// Helper ensuring we can constrain `T` on `F` without explicitly specifying it
fn bind<T, F: FnOnce(T) -> T>(_: T, f: F) -> F { f }

fn k() -> impl Sized {
    let x = match true {
        true => {
            // `f` is `FnDef(foo, [infer_var])`
            let f = foo;
            // Get a value of an opaque type on stable
            let t = k();
            // this returns `FnDef(foo, [k::return])`
            bind(t, f)
        }
        false => foo::<()>,
    };
    todo!()
}
```

r? ``@compiler-errors``

cc https://github.com/rust-lang/rust/issues/116652
2024-04-24 14:00:56 +02:00
..
assembly also update windows slack-protector tests 2024-04-22 23:45:04 -04:00
auxiliary extend extern tests to include FiveU16s 2024-03-17 00:07:42 -04:00
codegen Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
codegen-units Codegen const panic messages as function calls 2024-03-22 09:55:50 -04:00
coverage Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
coverage-run-rustdoc
crashes Rollup merge of #123993 - compiler-errors:coroutine-obl, r=lcnr 2024-04-23 17:25:16 +02:00
debuginfo Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
incremental Add missing -Zquery-dep-graph to the spike-neg incr comp tests 2024-04-06 13:36:16 +00:00
mir-opt Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
pretty Disallow ambiguous attributes on expressions 2024-04-18 20:42:19 +02:00
run-make Auto merge of #124112 - beetrees:incremental-os-str, r=Nadrieril 2024-04-22 04:00:58 +00:00
run-make-fulldeps Soft-destabilize RustcEncodable/RustcDecodable 2024-03-22 13:24:35 -07:00
run-pass-valgrind Add test for Apple's -weak_framework linker argument 2024-03-18 23:27:34 +01:00
rustdoc Auto merge of #118441 - GuillaumeGomez:display-stability-version, r=rustdoc 2024-04-19 14:17:29 +00:00
rustdoc-gui Rollup merge of #124197 - GuillaumeGomez:move-duplicated-code, r=notriddle 2024-04-23 06:24:56 +02:00
rustdoc-js rustdoc-search: single result for items with multiple paths 2024-04-08 17:07:14 -07:00
rustdoc-js-std rustdoc-search: fix description on aliases in results 2024-04-18 22:21:29 -07:00
rustdoc-json
rustdoc-ui Rollup merge of #122591 - gurry:122162-impl-type-binding-suggestion, r=fmease 2024-04-23 17:25:14 +02:00
ui Rollup merge of #123794 - oli-obk:define_opaque_types2, r=lcnr 2024-04-24 14:00:56 +02:00
ui-fulldeps Rollup merge of #124218 - Xiretza:subsubdiagnostics, r=davidtwco 2024-04-23 17:25:17 +02:00
COMPILER_TESTS.md