rust/src/test/ui/closures
bors aa7aca3b95 Auto merge of #89282 - sexxi-goose:fix-88118, r=nikomatsakis
2229: Consume IfLet expr

When using the IfLet guard feature, we can ICE when attempting to resolve PlaceBuilders.
For pattern matching, we currently don't consume the IfLet expression when "visiting" the arms leading us to not "read" all variables and hence not being able to resolve them.

r? `@nikomatsakis`
Closes https://github.com/rust-lang/rust/issues/88118
2021-09-30 20:23:47 +00:00
..
2229_closure_analysis Auto merge of #89282 - sexxi-goose:fix-88118, r=nikomatsakis 2021-09-30 20:23:47 +00:00
closure-expected-type bless expect-region-supply-region-2 test under polonius 2021-08-03 21:57:57 +02:00
print Modify structured suggestion output 2021-08-11 09:46:24 +00:00
closure-array-break-length.rs ty: convert ErrorHandled::Reported to ConstKind::Error. 2020-04-16 19:00:30 +03:00
closure-array-break-length.stderr ty: convert ErrorHandled::Reported to ConstKind::Error. 2020-04-16 19:00:30 +03:00
closure-bounds-cant-promote-superkind-in-struct.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-bounds-cant-promote-superkind-in-struct.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
closure-bounds-static-cant-capture-borrowed.nll.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
closure-bounds-static-cant-capture-borrowed.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-bounds-static-cant-capture-borrowed.stderr Don't suggest adding 'static lifetime to arguments 2021-05-12 21:43:09 -04:00
closure-bounds-subtype.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-bounds-subtype.stderr Point at call span that introduced obligation for the arg 2021-09-16 12:12:27 +00:00
closure-immutable-outer-variable.fixed liveness: Warn about unused captured variables 2020-05-29 17:46:38 +02:00
closure-immutable-outer-variable.rs liveness: Warn about unused captured variables 2020-05-29 17:46:38 +02:00
closure-immutable-outer-variable.rs.fixed remove remaining copyright headers 2018-12-28 21:50:33 +01:00
closure-immutable-outer-variable.stderr liveness: Warn about unused captured variables 2020-05-29 17:46:38 +02:00
closure-move-sync.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
closure-move-sync.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
closure-no-fn-1.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-no-fn-1.stderr diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-no-fn-2.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-no-fn-2.stderr diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-no-fn-3.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-no-fn-3.stderr pretty.rs: Update Closure and Generator print 2020-09-28 01:27:19 -04:00
closure-no-fn-4.rs diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-no-fn-4.stderr diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-no-fn-5.rs diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-no-fn-5.stderr diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-referencing-itself-issue-25954.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-referencing-itself-issue-25954.stderr Update tests 2019-03-11 23:10:26 +03:00
closure-reform-bad.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-reform-bad.stderr diagnostics: Note capturing closures can't be coerced to fns 2020-11-29 03:35:38 -05:00
closure-return-type-mismatch.rs Explain where the closure return type was inferred 2020-10-22 10:44:55 -04:00
closure-return-type-mismatch.stderr Explain where the closure return type was inferred 2020-10-22 10:44:55 -04:00
closure-wrong-kind.rs Remove licenses 2018-12-25 21:08:33 -07:00
closure-wrong-kind.stderr Update tests 2019-03-11 23:10:26 +03:00
closure_cap_coerce_many_fail.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
closure_cap_coerce_many_fail.stderr pretty.rs: Update Closure and Generator print 2020-09-28 01:27:19 -04:00
closure_no_cap_coerce_many_check_pass.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
closure_no_cap_coerce_many_run_pass.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
closure_no_cap_coerce_many_unsafe_0.mir.stderr Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
closure_no_cap_coerce_many_unsafe_0.rs Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
closure_no_cap_coerce_many_unsafe_0.thir.stderr Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
closure_no_cap_coerce_many_unsafe_1.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
coerce-unsafe-closure-to-unsafe-fn-ptr.rs Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr Test -Zthir-unsafeck for unsafe function calls 2021-05-11 20:35:38 +02:00
coerce-unsafe-to-closure.rs Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
coerce-unsafe-to-closure.stderr Point at call span that introduced obligation for the arg 2021-09-16 12:12:27 +00:00
deeply-nested_closures.rs Avoid exponential behaviour when relating types 2020-02-02 12:10:08 +00:00
diverging-closure.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
issue-41366.rs Normalize associated types with bound vars 2021-08-24 22:29:39 -04:00
issue-46742.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
issue-48109.rs Test for coercion between (FnDef | Closure) and (FnDef | Closure) 2020-05-09 11:02:31 +08:00
issue-52437.rs Update tests 2020-06-28 10:08:12 -07:00
issue-52437.stderr Update tests 2020-06-28 10:08:12 -07:00
issue-67123.rs Do not ICE on closure 2019-12-09 18:55:38 +09:00
issue-67123.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
issue-68025.rs Fix ICE #68025 2020-01-20 07:06:27 +09:00
issue-72408-nested-closures-exponential.rs Only visit types once when walking the type tree 2020-09-17 20:44:11 -05:00
issue-78720.rs Move some tests to more reasonable directories 2021-09-15 14:03:27 -03:00
issue-78720.stderr Move some tests to more reasonable directories 2021-09-15 14:03:27 -03:00
issue-80313-mutable-borrow-in-closure.rs Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutable-borrow-in-closure.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutable-borrow-in-move-closure.rs Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutable-borrow-in-move-closure.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutation-in-closure.rs Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutation-in-closure.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutation-in-move-closure.rs Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-80313-mutation-in-move-closure.stderr Point to span of upvar making closure FnMut 2021-01-25 16:53:27 +11:00
issue-81700-mut-borrow.rs Fix panic when emitting diagnostic for closure mutable binding error 2021-02-03 12:36:24 -05:00
issue-81700-mut-borrow.stderr Fix panic when emitting diagnostic for closure mutable binding error 2021-02-03 12:36:24 -05:00
issue-82438-mut-without-upvar.rs Skip emitting closure diagnostic when closure_kind_origins has no entry 2021-02-23 09:46:20 -05:00
issue-82438-mut-without-upvar.stderr Skip emitting closure diagnostic when closure_kind_origins has no entry 2021-02-23 09:46:20 -05:00
issue-84128.rs fix reporting return type in some cases 2021-04-16 17:06:19 +02:00
issue-84128.stderr fix reporting return type in some cases 2021-04-16 17:06:19 +02:00
issue-87461.rs Improve error reporting for closure return type mismatches 2021-08-21 00:13:09 +02:00
issue-87461.stderr Improve error reporting for closure return type mismatches 2021-08-21 00:13:09 +02:00
issue-87814-1.rs select obligations after check_casts 2021-08-23 19:16:16 +00:00
issue-87814-2.rs select obligations after check_casts 2021-08-23 19:16:16 +00:00
local-type-mix.rs Lower closure prototype after its body. 2021-01-21 22:59:07 +01:00
local-type-mix.stderr Lower closure prototype after its body. 2021-01-21 22:59:07 +01:00
old-closure-arg-call-as.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-arg.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-explicit-types.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-expr-precedence.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-expr-precedence.stderr Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-expression-remove-semicolon.fixed Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-expression-remove-semicolon.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-expression-remove-semicolon.stderr Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-fn-coerce.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-iter-1.rs Move block-related tests 2021-01-01 09:23:10 +09:00
old-closure-iter-2.rs Move block-related tests 2021-01-01 09:23:10 +09:00