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>2023-08-15 07:29:28 +0000
committerbors <bors@rust-lang.org>2023-08-15 07:29:28 +0000
commit7ca45dcf041ad16a06d7ea4185843d22a84acbcc (patch)
tree557c77fbfa4b6b7907e457ea2ef98bf2bbb97365 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc18ce9a08b703aed12af53e1f2ef326d24238b1d (diff)
parent17f3055803f8d6551b746192a4ba78edb5b62995 (diff)
downloadrust-7ca45dcf041ad16a06d7ea4185843d22a84acbcc.tar.gz
rust-7ca45dcf041ad16a06d7ea4185843d22a84acbcc.zip
Auto merge of #15410 - alibektas:15240/invalid-demorgan, r=Veykril
internal : rewrite DeMorgan assist

fixes #15239 , #15240 . This PR is a rewrite of the DeMorgan assist that essentially rids of all the string manipulation and modifies syntax trees to apply demorgan on a binary expr. The main reason for the rewrite is that I wanted to use `Expr::needs_parens_in` method to see if the expr on which the assist is applied would still need the parens it had once the parent expression's operator had equal precedence with that of the expression. I used `.clone_(subtree|for_update)` left and right and probably more than I should have, so I would also be happy to hear how I could have prevented redundant cloning.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions