Rollup merge of #130510 - samueltardieu:doc-letstmt-assign-desugar, r=compiler-errors

doc: the source of `LetStmt` can also be `AssignDesugar`

For example, the two following statements are desugared into a block whose `LetStmt` source is `AssignDesugar`:

```rust
_ = ignoring_some_result();
(a, b) = (b, a);
```
This commit is contained in:
Matthias Krüger 2024-09-18 17:49:45 +02:00 committed by GitHub
commit c0951bbce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1378,7 +1378,8 @@ pub struct LetStmt<'hir> {
pub hir_id: HirId,
pub span: Span,
/// Can be `ForLoopDesugar` if the `let` statement is part of a `for` loop
/// desugaring. Otherwise will be `Normal`.
/// desugaring, or `AssignDesugar` if it is the result of a complex
/// assignment desugaring. Otherwise will be `Normal`.
pub source: LocalSource,
}