rust/src/test
bors 03b9e1d154 Auto merge of #105409 - compiler-errors:closure-infer-cycle, r=jackh726
Don't deduce a signature that makes a closure cyclic

Sometimes when elaborating supertrait bounds for closure signature inference, we end up deducing a closure signature that is cyclical because either a parameter or the return type references a projection mentioning `Self` that also has escaping bound vars, which means that it's not eagerly replaced with an inference variable.

Interestingly, this is not *just* related to my PR that elaborates supertrait bounds for closure signature deduction. The committed test `supertrait-hint-cycle-3.rs` shows **stable** code that is fixed by this PR:

```rust
trait Foo<'a> {
    type Input;
}

impl<F: Fn(u32)> Foo<'_> for F {
    type Input = u32;
}

fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {}

fn main() {
    needs_super(|_: u32| {});
}
```

Fixes #105401
Fixes #105396

r? types
2023-01-05 03:59:31 +00:00
..
assembly Add -Zno-jump-tables 2022-12-20 21:42:54 +01:00
auxiliary
codegen Rollup merge of #106292 - Nilstrieb:box-uninit-test, r=RalfJung 2023-01-04 07:28:55 +01:00
codegen-units Statics used in reachable function's inline asm are reachable 2022-11-28 18:28:05 +01:00
debuginfo Fix pretty-std test 2022-11-27 23:15:55 +01:00
incremental Remove references to removed option from tests. 2022-12-25 18:48:48 +00:00
mir-opt Reenable limited top-down MIR inlining 2023-01-01 22:01:29 -08:00
pretty Rollup merge of #99939 - saethlin:pre-sort-tests, r=thomcc,jackh726 2022-10-24 19:32:25 +09:00
run-make Add json output to -Zdump-mono-stats 2023-01-02 23:02:58 +00:00
run-make-fulldeps Add missing extern crate rustc_driver 2022-12-31 17:20:13 +00:00
run-pass-valgrind Bless more tests 2022-11-05 18:05:45 +00:00
rustdoc Rename Rptr to Ref in AST and HIR 2022-12-28 18:52:36 +01:00
rustdoc-gui Rollup merge of #106437 - notriddle:notriddle/http-url, r=GuillaumeGomez 2023-01-04 23:39:50 +01:00
rustdoc-js Add regression test for reexports in search results 2022-10-30 13:58:00 +01:00
rustdoc-js-std
rustdoc-json Rollup merge of #106412 - GuillaumeGomez:fix-links-to-primitive-rustdoc-json, r=aDotInTheVoid 2023-01-04 23:39:50 +01:00
rustdoc-ui Rollup merge of #106274 - jyn514:dump-mono-stats, r=lqd 2023-01-04 07:28:54 +01:00
ui Auto merge of #105409 - compiler-errors:closure-infer-cycle, r=jackh726 2023-01-05 03:59:31 +00:00
ui-fulldeps Add missing extern crate rustc_driver 2022-12-31 17:20:13 +00:00
COMPILER_TESTS.md