summary refs log tree commit diff
path: root/src/test/ui/let-else
AgeCommit message (Collapse)AuthorLines
2022-10-05use build-pass for the testX-1/+1
(cherry picked from commit 5131e9db07fb6cd158cf5bf2aa9fefbad3af1d2b)
2022-10-05fix unwind drop glue for if-then scopesDing Xiang Fei-0/+20
(cherry picked from commit 4a2c1a12b662eb590dbe78f7f9d13c2f327d3bb6)
2022-10-04add miri test via const fnDing Xiang Fei-0/+19
(cherry picked from commit eb36f5ee5b71cbe3eb356f8e56e9c9a69b6d649d)
2022-09-15Remove the let_else feature gate from the testsuiteest31-57/+43
Result of running: rg -l "feature.let_else" src/test/ | xargs sed -s -i "s#^...feature.let_else..\$##" Plus manual tidy fixes.
2022-09-15Stabilize the let_else featureest31-0/+8
2022-09-15add test for #99975Ding Xiang Fei-0/+20
2022-09-15reorder nesting scopes and declare bindings without drop scheduleDing Xiang Fei-0/+1
2022-09-05Add matrix based test for documenting the let / let else temporary drop orderest31-0/+321
The drop order of let and let else is supposed to be the same, and in order to ensure this, the test checks that this holds for the given list of cases. The test also ensures that we drop the temporaries of the condition before executing the else block. We made the test matrix based so it can check all the possible combinations and find out possible edge cases.
2022-08-25Rollup merge of #99954 - dingxiangfei2009:break-out-let-else-higher-up, ↵Yuki Okushi-0/+11
r=oli-obk let-else: break out to one scope higher for let-else ```@est31``` This PR follows up with #99518 which is to break out to the last remainder scope. It breaks to the out-most `region_scope` of the block if the first statement is a `let-else`.
2022-08-12Add regression test for #94176est31-0/+29
2022-08-12let-else: add a test for warnings on let-else with diverging tailCormac Relf-0/+33
2022-08-04Use (actually) dummy place for let-else divergenceMichael Goulet-0/+15
2022-07-31add test for earlier drop despite extend lifetimeDing Xiang Fei-0/+11
2022-07-22include a demo that more programs can be compiledDing Xiang Fei-0/+17
2022-07-21provide a test for #93951Ding Xiang Fei-0/+11
2022-07-21break out scopes when let-else fails to matchDing Xiang Fei-0/+61
2022-07-11lower let-else in MIR insteadDing Xiang Fei-21/+58
2022-06-16--bless uiMaybe Waffle-2/+1
2022-05-06Resolve vars in note_type_errJack Huey-4/+4
2022-02-28Tweak diagnosticsEsteban Kuber-4/+4
* Recover from invalid `'label: ` before block. * Make suggestion to enclose statements in a block multipart. * Point at `match`, `while`, `loop` and `unsafe` keywords when failing to parse their expression. * Do not suggest `{ ; }`. * Do not suggest `|` when very unlikely to be what was wanted (in `let` statements).
2022-02-22Rollup merge of #94208 - est31:let_else, r=Mark-SimulacrumMatthias Krüger-4/+100
Add the let else tests found missing in the stabilization report In the stabilization report of `let else`, in #93628, I found various cases which weren't tested. This PR adds them.
2022-02-21Better error if the user tries to do assignment ... elseest31-0/+35
2022-02-21Add regression test for #92069est31-0/+20
2022-02-21Expand let-else allow testsest31-4/+80
The #[allow(...)] directive was tested for the body and the pattern, but non-presence of it wasn't tested. Furthermore, it wasn't tested for the expression. We add expression tests as well as ones checking the non-presence of the directive.
2021-12-13let-else: add deref-coercion testsCormac Relf-0/+171
2021-12-13let-else: add match-ergonomics tests adapted from rfc2005Cormac Relf-0/+228
collect explicit-mut passing tests in one file
2021-12-13let-else: build out ref/ref mut tests, with/without explicit annotationsCormac Relf-19/+208
expands issue 89960
2021-12-13let-else: add tests for moved expressions, copy out of non-copyCormac Relf-0/+62
2021-12-13let-else: fix attribute aliasing + add test for issue 89807Cormac Relf-0/+14
2021-10-18Rollup merge of #89974 - est31:let_else_if_error, r=nagisaMatthias Krüger-0/+28
Nicer error message if the user attempts to do let...else if Gives a nice "conditional `else if` is not supported for `let...else`" error when encountering a `let...else if` pattern, as suggested in the [let...else tracking issue](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205).
2021-10-18Rollup merge of #89965 - JohnTitor:fix-let-else-ice-with-ref-mut, r=petrochenkovMatthias Krüger-0/+19
Fix ICE with `let...else` and `ref mut` Fixes #89960, opened for review. I'm not satisfied with the current diagnostics, any ideas?
2021-10-17Nicer error message if the user attempts to do let...else ifest31-0/+28
2021-10-17Some "parenthesis" and "parentheses" fixesr00ster91-6/+6
2021-10-17Fix ICE with `let...else` and `ref mut`Yuki Okushi-0/+19
2021-08-30Add let-else testsCameron Steffen-0/+322