rust/tests/ui/closures
Matthias Krüger 089e8c03bc
Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillot
Implement partial support for non-lifetime binders

This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed.

Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged.

Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`)

cc rust-lang/types-team#81

r? `@ghost`
2023-02-17 00:19:34 +01:00
..
2229_closure_analysis Fix unintentional UB in ui tests 2023-02-15 09:05:05 -05:00
binder Add feature gate for non_lifetime_binders 2023-02-16 03:39:58 +00:00
closure-expected-type Move /src/test to /tests 2023-01-11 09:32:08 +00:00
print Move /src/test to /tests 2023-01-11 09:32:08 +00:00
add_semicolon_non_block_closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
add_semicolon_non_block_closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_cap_coerce_many_fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_cap_coerce_many_fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_check_pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_run_pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_unsafe_0.mir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_unsafe_0.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_unsafe_0.thir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_no_cap_coerce_many_unsafe_1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure_promotion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-array-break-length.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-array-break-length.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-cant-promote-superkind-in-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-cant-promote-superkind-in-struct.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-static-cant-capture-borrowed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-static-cant-capture-borrowed.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-subtype.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-bounds-subtype.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-expected.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-expected.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-immutable-outer-variable.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-immutable-outer-variable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-immutable-outer-variable.rs.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-immutable-outer-variable.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-move-sync.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-move-sync.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-4.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-4.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-5.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-no-fn-5.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-referencing-itself-issue-25954.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-referencing-itself-issue-25954.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-reform-bad.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-reform-bad.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-return-type-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-return-type-mismatch.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-return-type-must-be-sized.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-return-type-must-be-sized.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-wrong-kind.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-wrong-kind.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-unsafe-closure-to-unsafe-fn-ptr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-unsafe-to-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-unsafe-to-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deeply-nested_closures.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
diverging-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6801.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6801.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-10398.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-10398.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23012-supertrait-signature-inference.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-41366.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-42463.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46742.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-48109.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52437.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52437.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67123.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67123.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-68025.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72408-nested-closures-exponential.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-78720.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-78720.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-80313-mutable-borrow-in-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutable-borrow-in-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutable-borrow-in-move-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutable-borrow-in-move-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutation-in-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutation-in-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutation-in-move-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80313-mutation-in-move-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81700-mut-borrow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81700-mut-borrow.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82438-mut-without-upvar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82438-mut-without-upvar.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84044-drop-non-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84044-drop-non-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84128.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84128.stderr Emit a hint for bad call return types due to generic arguments 2023-01-13 13:34:55 +09:00
issue-87461.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87461.stderr Emit a hint for bad call return types due to generic arguments 2023-01-13 13:34:55 +09:00
issue-87814-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87814-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90871.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90871.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97607.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99565.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99565.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-101696.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102089-multiple-opaque-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
local-type-mix.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
local-type-mix.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiple-fn-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiple-fn-bounds.stderr Tweak "borrow closure argument" suggestion 2023-01-19 19:35:49 +00:00
old-closure-arg-call-as.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-arg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-explicit-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-expr-precedence.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-expr-precedence.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-expression-remove-semicolon.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-expression-remove-semicolon.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-expression-remove-semicolon.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-fn-coerce.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-iter-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
old-closure-iter-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
once-move-out-on-heap.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
semistatement-in-lambda.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
supertrait-hint-cycle-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
supertrait-hint-cycle-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
supertrait-hint-cycle.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
supertrait-hint-references-assoc-ty.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
thir-unsafeck-issue-85871.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00