Conversation
| }; | ||
| ``` | ||
|
|
||
| `if let` guards are introduced by the `if let` keywords and are composed of a pattern, an `=` and a scrutinee expression. |
There was a problem hiding this comment.
| `if let` guards are introduced by the `if let` keywords and are composed of a pattern, an `=` and a scrutinee expression. | |
| `if let` guards are composed following [The Rust Reference `if let` keywords syntax](https://doc.rust-lang.org/stable/reference/expressions/if-expr.html#if-let-expressions). |
There was a problem hiding this comment.
@kw-fn, I think the original is correct here, as it is just describing the syntax, and is a style used throughout the reference as a way to anchor the description of what the text is talking about. Also, we do not use external links, or refer to the reference by name within itself.
|
Thanks @LeSeulArtichaut, this looks good to me! It will need to wait for it to be stabilized on nightly, though happy to discuss any feedback from the lang team in the meantime. |
|
This text reads well to me. |
|
I think we can close this with the documentation we have currently in the reference now at time of writing |
| > `if` [_Expression_] | ||
| > | ||
| > _MatchArmIfLetGuard_:\ | ||
| > `if` `let` [_Pattern_] `=` _Scrutinee_<sub>_except lazy boolean operator expression_</sub> |
There was a problem hiding this comment.
| > `if` `let` [_Pattern_] `=` _Scrutinee_<sub>_except lazy boolean operator expression_</sub> | |
| > `if` `let` [_Pattern_] `=` _Scrutinee_ |
After rust#115371
|
☔ The latest upstream changes (possibly 4249fb4) made this pull request unmergeable. Please resolve the merge conflicts. |
cc @pnkfelix rust-lang/rfcs#2294 rust-lang/rust#51114