2
0
Fork 0
mirror of https://github.com/rust-lang/rust-analyzer synced 2025-02-13 20:48:33 +00:00
rust-analyzer/crates/syntax/src
bors 7ca45dcf04 Auto merge of - alibektas:15240/invalid-demorgan, r=Veykril
internal : rewrite DeMorgan assist

fixes  ,  . 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.
2023-08-15 07:29:28 +00:00
..
ast Auto merge of - alibektas:15240/invalid-demorgan, r=Veykril 2023-08-15 07:29:28 +00:00
parsing Support c string literals 2023-05-18 11:06:05 +02:00
tests fix: Expand eager macros to delimited comma separated expression list 2023-07-30 17:31:26 +02:00
validation Add semicolons for consistency 2021-10-03 23:39:43 +11:00
algo.rs use inline format args 2023-01-02 14:52:32 +00:00
ast.rs refactor: leverage HasAttrs for code brevity 2023-03-04 00:24:03 +09:00
fuzz.rs Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
hacks.rs Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
lib.rs fix: Fix float parser hack creating empty NameRef tokens 2023-08-08 14:44:33 +02:00
parsing.rs dead code 2021-12-28 19:13:30 +03:00
ptr.rs Moar linting: needless_borrow, let_unit_value, ... 2022-12-25 05:07:47 -05:00
syntax_error.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
syntax_node.rs suppress lint 2023-01-10 07:06:26 +00:00
ted.rs Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
tests.rs remove needless borrows 2023-01-02 14:52:32 +00:00
token_text.rs Bump smol-str 2023-04-11 14:39:19 +02:00
utils.rs Make is_raw_identifier() public util function 2023-02-13 18:43:59 +09:00
validation.rs Support c string literals 2023-05-18 11:06:05 +02:00