1
Fork 0

Rollup merge of #82215 - TaKO8Ki:replace-if-let-while-let, r=varkor

Replace if-let and while-let with `if let` and `while let`

This pull request replaces if-let and while-let with `if let` and `while let`.

closes https://github.com/rust-lang/rust/issues/82205
This commit is contained in:
Dylan DPC 2021-02-18 16:57:37 +01:00 committed by GitHub
commit b3d3251271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 45 additions and 45 deletions

View file

@ -1,6 +1,6 @@
#### Note: this error code is no longer emitted by the compiler.
An if-let pattern attempts to match the pattern, and enters the body if the
An `if let` pattern attempts to match the pattern, and enters the body if the
match was successful. If the match is irrefutable (when it cannot fail to
match), use a regular `let`-binding instead. For instance:

View file

@ -1,6 +1,6 @@
#### Note: this error code is no longer emitted by the compiler.
A while-let pattern attempts to match the pattern, and enters the body if the
A `while let` pattern attempts to match the pattern, and enters the body if the
match was successful. If the match is irrefutable (when it cannot fail to
match), use a regular `let`-binding inside a `loop` instead. For instance: