1
Fork 0
rust/tests/ui/async-await/async-closures
Guillaume Gomez e5b2935dc1
Rollup merge of #123662 - compiler-errors:no-upvars-yet, r=oli-obk
Don't rely on upvars being assigned just because coroutine-closure kind is assigned

Previously, code relied on the implicit assumption that if a coroutine-closure's kind variable was constrained, then its upvars were also constrained. This is because we assign all of them at once at the end up upvar analysis.

However, there's another way that a coroutine-closure's kind can be constrained: from a signature hint in closure signature deduction. After #123350, we use these hints, which means the implicit assumption above no longer holds.

This PR adds the necessary checks so that we don't ICE.

r? oli-obk
2024-04-09 13:39:23 +02:00
..
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arg-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arg-mismatch.stderr Add some tests 2024-02-06 02:22:58 +00:00
async-fn-mut-for-async-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-once-for-async-fn.rs Flesh out a few more tests 2024-02-27 17:39:20 +00:00
await-inference-guidance.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
brand.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
captures.rs Force move async-closures that are FnOnce to make their inner coroutines also move 2024-04-04 19:44:51 -04:00
captures.run.stdout Force move async-closures that are FnOnce to make their inner coroutines also move 2024-04-04 19:44:51 -04:00
constrained-but-no-upvars-yet.rs Don't rely on upvars being assigned just because coroutine-closure kind is assigned 2024-04-08 22:43:32 -04:00
def-path.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
def-path.stderr Only split by-ref/by-move futures for async closures 2024-03-19 16:59:23 -04:00
drop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop.run.stdout Fix drop shim for AsyncFnOnce closure, AsyncFnMut shim for AsyncFn closure 2024-02-06 02:22:58 +00:00
foreign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
higher-ranked-return.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
higher-ranked-return.stderr Add some tests 2024-02-06 02:22:58 +00:00
higher-ranked.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
is-fn.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
is-not-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
is-not-fn.stderr Print kind of coroutine closure 2024-02-10 23:18:01 +00:00
mangle.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
move-consuming-capture.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
move-consuming-capture.stderr Print kind of coroutine closure 2024-02-10 23:18:01 +00:00
move-is-async-fn.rs Flesh out a few more tests 2024-02-27 17:39:20 +00:00
mut-ref-reborrow.rs Account for an additional reborrow inserted by UniqueImmBorrow and MutBorrow 2024-04-05 17:35:03 -04:00
mutate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
not-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
not-fn.stderr make better async fn kind errors 2024-02-15 15:59:35 +00:00
not-lending.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
not-lending.stderr Add some tests 2024-02-06 02:22:58 +00:00
once.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
overlapping-projs.rs Check the base of the place too! 2024-04-05 16:48:45 -04:00
overlapping-projs.run.stdout Check the base of the place too! 2024-04-05 16:48:45 -04:00
precise-captures.call.run.stdout Rework the ByMoveBody shim to actually work correctly 2024-04-05 15:28:13 -04:00
precise-captures.call_once.run.stdout Rework the ByMoveBody shim to actually work correctly 2024-04-05 15:28:13 -04:00
precise-captures.force_once.run.stdout Rework the ByMoveBody shim to actually work correctly 2024-04-05 15:28:13 -04:00
precise-captures.rs Rework the ByMoveBody shim to actually work correctly 2024-04-05 15:28:13 -04:00
refd.rs Flesh out a few more tests 2024-02-27 17:39:20 +00:00
return-type-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
return-type-mismatch.stderr Add some tests 2024-02-06 02:22:58 +00:00
signature-deduction.rs Implement async closure signature deduction 2024-03-01 16:03:57 +00:00
tainted-body.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
tainted-body.stderr Don't ICE in ByMoveBody when coroutine is tainted 2024-02-09 00:36:30 +00:00
truncated-fields-when-imm.rs Actually, stop making any assumption about the projections applied to the upvar 2024-04-08 19:47:52 -04:00
wrong-fn-kind.rs Actually use the inferred ClosureKind from signature inference in coroutine-closures 2024-04-04 19:44:35 -04:00
wrong-fn-kind.stderr Actually use the inferred ClosureKind from signature inference in coroutine-closures 2024-04-04 19:44:35 -04:00