about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-24 13:57:14 +0000
committerbors <bors@rust-lang.org>2022-07-24 13:57:14 +0000
commit537cc1eec5bc0f26df112c0cdb4a16c793189ab0 (patch)
tree463985f78478130c679d201e3a83a538e151c134 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent894d6a232c1cf69f7050a33223f687c4623e4d16 (diff)
parent805ac666ca8cb2b643026ff454951e9ce3834d94 (diff)
downloadrust-537cc1eec5bc0f26df112c0cdb4a16c793189ab0.tar.gz
rust-537cc1eec5bc0f26df112c0cdb4a16c793189ab0.zip
Auto merge of #12863 - lowr:fix/missing-fields-on-destructuring-assignment, r=Veykril
Fix missing fields check on destructuring assignment

Fixes #12838

When checking if the record literal in question is an assignee expression or not, the new fn `is_assignee_record_literal` iterates over its ancestors until it is sure. This isn't super efficient, as we don't cache anything and does the iteration for every record literal during missing fields check. Alternatively, we may want to have a field like `assignee` on `hir_def::Expr::{RecordLit, Array, Tuple, Call}` to tell if it's an assignee expression, which would be O(1) when checking later but have some memory overhead for the field.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions