Skip to content

Mention let...else in the Chapter 6 overview, the else keyword entry, and Chapter 19 - #4886

Open
KishSiva wants to merge 1 commit into
rust-lang:mainfrom
KishSiva:fix/let-else-mentions
Open

KishSiva wants to merge 1 commit into
rust-lang:mainfrom
KishSiva:fix/let-else-mentions

Conversation

@KishSiva

@KishSiva KishSiva commented Nov 1, 2026

Copy link
Copy Markdown

Fixes #4869

Chapter 6 teaches let...else (and the table of contents names it), but three places that enumerate where patterns or else appear still leave it out. This adds it to each of them:

  • src/ch06-00-enums.md: the chapter overview now ends with "the if let and let...else constructs" instead of only if let.
  • src/appendix-01-keywords.md: the else entry now reads "Fallback for if, if let, and let...else control flow constructs".
  • src/ch19-01-all-the-places-for-patterns.md: the sentence "Prior to this chapter, we had only explicitly discussed using patterns with match and if let" now also names let...else and while let (both were discussed in earlier chapters), and there is a new short "let...else Statements" subsection after the if let one. It describes what let...else binds, that the else block must diverge, and that it accepts a refutable pattern, which hands off to the next section on refutability. The example is a three-line rust,ignore block, so no listing directory is added.

Prose is wrapped at 80 columns like the surrounding text. Nothing under nostarch/ is touched.

Chapter 6 teaches `let...else`, but three places that enumerate where
patterns or `else` appear left it out: the Chapter 6 overview, the
`else` entry in Appendix A, and Chapter 19's tour of all the places
patterns can be used. Add it to each, with a short `let...else`
subsection in Chapter 19 next to the `if let` one.

Fixes rust-lang#4869

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

let...else is missing from Chapter 19's list of pattern places, the Chapter 6 overview and the else keyword entry

1 participant