diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-18 17:49:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 17:49:45 +0200 |
| commit | c0951bbce262aab3c0dfdd9f3ebbc0bdf7543173 (patch) | |
| tree | 1a1b46d23d14efea8c202c0756adf2d88c4073f7 | |
| parent | 48b90aaed38a85afafa45a15198a1472b84acf98 (diff) | |
| parent | a47e9b6c54adb5a9577e6394a8ba4b98aac55f21 (diff) | |
| download | rust-c0951bbce262aab3c0dfdd9f3ebbc0bdf7543173.tar.gz rust-c0951bbce262aab3c0dfdd9f3ebbc0bdf7543173.zip | |
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); ```
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 26118bcbb9f..f92c6650355 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -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, } |
