diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-18 16:57:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 16:57:37 +0100 |
| commit | b3d325127143296de07269da7940a411526df022 (patch) | |
| tree | 0ad15dcddfe3a66f30c30605f1150bcf4314cd3e /compiler/rustc_error_codes/src | |
| parent | f01b339dae824e61feba6b778fdd701cbb68c820 (diff) | |
| parent | 0f04875d2e21919e5f716b9946407ba07de08840 (diff) | |
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
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0162.md | 2 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0165.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0162.md b/compiler/rustc_error_codes/src/error_codes/E0162.md index 98146147f39..0161c9325c2 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0162.md +++ b/compiler/rustc_error_codes/src/error_codes/E0162.md @@ -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: diff --git a/compiler/rustc_error_codes/src/error_codes/E0165.md b/compiler/rustc_error_codes/src/error_codes/E0165.md index 92243db4550..7bcd6c0cbf3 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0165.md +++ b/compiler/rustc_error_codes/src/error_codes/E0165.md @@ -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: |
