Skip to content

Commit a47e9b6

Browse files
committed
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); ```
1 parent 82d17a4 commit a47e9b6

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)