Skip to content

Commit c0951bb

Browse files
authored
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); ```
2 parents 48b90aa + a47e9b6 commit c0951bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: compiler/rustc_hir/src/hir.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,8 @@ pub struct LetStmt<'hir> {
13781378
pub hir_id: HirId,
13791379
pub span: Span,
13801380
/// Can be `ForLoopDesugar` if the `let` statement is part of a `for` loop
1381-
/// desugaring. Otherwise will be `Normal`.
1381+
/// desugaring, or `AssignDesugar` if it is the result of a complex
1382+
/// assignment desugaring. Otherwise will be `Normal`.
13821383
pub source: LocalSource,
13831384
}
13841385

0 commit comments

Comments
 (0)