-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
I haven't done exhaustive checking on this, but it looks like most error/warning messages use let...else, for example:
rust/compiler/rustc_parse/messages.ftl
Line 299 in 8401398
parse_extra_if_in_let_else = remove the `if` if you meant to write a `let...else` statement rust/compiler/rustc_mir_build/messages.ftl
Line 191 in 8401398
mir_build_irrefutable_let_patterns_let_else = irrefutable `let...else` {$count -> err.help("...or use `match` instead of `let...else`");
And, most importantly to me, the next print edition of TRPL is about to go out referring to the feature as let...else.
However, there are some error/warning messages that refer to the feature as let else; I think these should be changed to let...else. Some examples:
rust/compiler/rustc_parse/src/parser/stmt.rs
Line 870 in 8401398
format!("{alternatively}you might have meant to use `let else`"), rust/compiler/rustc_mir_build/messages.ftl
Line 337 in 8401398
mir_build_suggest_let_else = you might want to use `let else` to handle the {$count ->
There are also a number of places that refer to the feature as let-else, but I'm not sure how many of these are really user facing. Example:
rust/src/doc/style-guide/src/statements.md
Lines 103 to 111 in 8401398
| ### else blocks (let-else statements) | |
| A let statement can contain an `else` component, making it a let-else statement. | |
| In this case, always apply the same formatting rules to the components preceding | |
| the `else` block (i.e. the `let pattern: Type = initializer_expr` portion) | |
| as described [for other let statements](#let-statements). | |
| Format the entire let-else statement on a single line if all the following are | |
| true: |