-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: let-else statements #3137
RFC: let-else statements #3137
Commits on Jun 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2b92ef5 - Browse repository at this point
Copy the full SHA 2b92ef5View commit details
Commits on Jun 2, 2021
-
let-else draft updates from zulip
Specifically bstrie's suggestion of `ExpressionWithoutBlock`. Also some spelling fixes and example updates.
Configuration menu - View commit details
-
Copy full SHA for 3438586 - Browse repository at this point
Copy the full SHA 3438586View commit details -
let-else draft updates for if-let-chains
Thanks to Frank Steffahn for pointing this out in Zulip.
Configuration menu - View commit details
-
Copy full SHA for c131adb - Browse repository at this point
Copy the full SHA c131adbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9e75dc - Browse repository at this point
Copy the full SHA c9e75dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9e8bd4 - Browse repository at this point
Copy the full SHA d9e8bd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5c3456 - Browse repository at this point
Copy the full SHA b5c3456View commit details
Commits on Jun 3, 2021
-
let-else draft, remove old example
Also mentions the diverging return type of `!` in the summary.
Configuration menu - View commit details
-
Copy full SHA for 059587f - Browse repository at this point
Copy the full SHA 059587fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93c1f7c - Browse repository at this point
Copy the full SHA 93c1f7cView commit details -
let-else: inital updates from Josh
Co-Authored-By: Josh Triplett <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 836f2c4 - Browse repository at this point
Copy the full SHA 836f2c4View commit details
Commits on Jun 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 22e8430 - Browse repository at this point
Copy the full SHA 22e8430View commit details -
Configuration menu - View commit details
-
Copy full SHA for d25d51a - Browse repository at this point
Copy the full SHA d25d51aView commit details
Commits on Jun 8, 2021
-
- Example now shows side-effects and dependence, cannot be reproduced by a single large `match`. - Note lazy boolean operator dis-allowance more prominently - Note `irrefutable_let_patterns` lint warning. - Make a decision for the if-let-chains future possibility: just disallow the problematic case - Clarify the note about `static` and `const` _items_. - Add section about "let-else within if-let" (I guess this RFC had it coming for it)
Configuration menu - View commit details
-
Copy full SHA for f3473f6 - Browse repository at this point
Copy the full SHA f3473f6View commit details
Commits on Jun 14, 2021
-
let-else, another round of updates
- Clarify the diverging return type to be anything which returns never. - More detailed desugaring example with the above point. - Get rid of `BlockExpressionDiverging`. - Alternative: `let` assignment from `match`. - Alternative: `||` in pattern matching. - Prior art: `guard!` macro.
Configuration menu - View commit details
-
Copy full SHA for 6a9a9ef - Browse repository at this point
Copy the full SHA 6a9a9efView commit details
Commits on Jun 17, 2021
-
let-else, avoid let-else within if-let
per Josh's recommendation and general discussion
Configuration menu - View commit details
-
Copy full SHA for 18ebdca - Browse repository at this point
Copy the full SHA 18ebdcaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 324117c - Browse repository at this point
Copy the full SHA 324117cView commit details -
let-else, note let-else-else-chains
Most of this was Josh's suggestion and some is his words almost verbatim. Co-Authored-By: Josh Triplett <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb81a98 - Browse repository at this point
Copy the full SHA bb81a98View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff866ea - Browse repository at this point
Copy the full SHA ff866eaView commit details -
let-else, update || example desugar
Thanks to lebensterben for catching this one
Configuration menu - View commit details
-
Copy full SHA for a4d9456 - Browse repository at this point
Copy the full SHA a4d9456View commit details -
Configuration menu - View commit details
-
Copy full SHA for cab12fc - Browse repository at this point
Copy the full SHA cab12fcView commit details
Commits on Jun 28, 2021
-
- Clarify that `: TYPE` is allowed, as per Josh - Note the expression restriction more accurately and with more detail, as per Niko - Removed the option-chaining example, because many people keep stopping at that to comment. - Note a macro as an (unfavorable) alternative.
Configuration menu - View commit details
-
Copy full SHA for 89c5b6e - Browse repository at this point
Copy the full SHA 89c5b6eView commit details
Commits on Jul 2, 2021
-
let-else, fix a never type link
Co-authored-by: J. Frimmel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 54bca55 - Browse repository at this point
Copy the full SHA 54bca55View commit details
Commits on Jul 13, 2021
-
Hopefully this will be my last round of updates. - Added some unresolved questions. - Fixed some typos / english language clarification. - Clarified that all expressions ending in `}` should be disallowed. - Fixed some errors in examples. - Added section on `, else`. - Updated the `unless let` section to be "Introducer syntax" with the noted keyword being `guard`. - Noted the `DIVERGING_EXPR` section with more detail.
Configuration menu - View commit details
-
Copy full SHA for c0c2fcc - Browse repository at this point
Copy the full SHA c0c2fccView commit details
Commits on Jul 19, 2021
-
Excluding the block grammar clarifications for now, because those have evolved somewhat in Zulip. Co-authored-by: Mario Carneiro <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 76e8bb5 - Browse repository at this point
Copy the full SHA 76e8bb5View commit details
Commits on Jul 20, 2021
-
let-else, disallow any expr ending with
}
.As per discussion in GitHub and Zulip, this seems like the most straightforward path until practical experimentation can be done.
Configuration menu - View commit details
-
Copy full SHA for b6b87d6 - Browse repository at this point
Copy the full SHA b6b87d6View commit details -
let-else, mention macro expansions
Forgot this in the last commit. Invisible groupings from macros should be allowed but should be shown to humans in visible expansion tools.
Configuration menu - View commit details
-
Copy full SHA for 952745b - Browse repository at this point
Copy the full SHA 952745bView commit details