about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAda Alakbarova <ada.alakbarova@proton.me>2025-07-12 14:47:28 +0200
committerAda Alakbarova <ada.alakbarova@proton.me>2025-08-01 11:24:44 +0200
commiteea4d6dc3cdc96cea7d4367726a6c0f18ab5a4ba (patch)
treeb74bf2b53f350601320bb2c0334b877fa5ec3c09 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentfab7eab7fbedef1e352884f3dafffa2a9fab048b (diff)
downloadrust-eea4d6dc3cdc96cea7d4367726a6c0f18ab5a4ba.tar.gz
rust-eea4d6dc3cdc96cea7d4367726a6c0f18ab5a4ba.zip
`{flat_,}map_identity`: recognize (tuple) struct de- and restructuring
base check

same fields different struct

reordered fields

different paths to the same struct

same for tuple structs

style: use `zip`-the-function all over the place

makes the code a bit more concise by removing the need for explicit
`.iter()`

style: move precondition checking to the match guard

the match arms above put the "sanity" checks in the guard, and call only
`check_pat` in the body. With this commit, the (tuple) struct cases
follow that convention as well. Well, almost -- I think the ident check
belongs to the second category of checks, so I put it in the body as
well

misc: use `None` in the pattern directly

this'll probably be marginally faster thanks to the equality check being
now structural

move the tests to the right file
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions