Skip to content

Error/warning messages should consistently use let...else #148772

@carols10cents

Description

@carols10cents

I haven't done exhaustive checking on this, but it looks like most error/warning messages use let...else, for example:

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:

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:

### 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:

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.D-inconsistentDiagnostics: Inconsistency in formatting, grammar or style between diagnostic messages.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions