ruff/crates/ruff_python_formatter/src/expression
Douglas Creager 98ef564170
Remove AstNode and AnyNode (#15479)
While looking into potential AST optimizations, I noticed the `AstNode`
trait and `AnyNode` type aren't used anywhere in Ruff or Red Knot. It
looks like they might be historical artifacts of previous ways of
consuming AST nodes?

- `AstNode::cast`, `AstNode::cast_ref`, and `AstNode::can_cast` are not
used anywhere.
- Since `cast_ref` isn't needed anymore, the `Ref` associated type isn't
either.

This is a pure refactoring, with no intended behavior changes.
2025-01-17 17:11:00 -05:00
..
binary_like.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
expr_attribute.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_await.rs Fix instability with await fluent style (#8676) 2023-11-17 12:24:19 -05:00
expr_bin_op.rs Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
expr_bool_op.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
expr_boolean_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_bytes_literal.rs Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
expr_call.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_compare.rs Fix f-string formatting in assignment statement (#14454) 2024-11-26 15:07:18 +05:30
expr_dict.rs Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
expr_dict_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_ellipsis_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_f_string.rs Ruff 2025 style guide (#13906) 2025-01-09 10:20:06 +01:00
expr_generator.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_if.rs Remove Expr postfix from ExprNamed, ExprIf, and ExprGenerator (#10229) 2024-03-04 12:55:01 +01:00
expr_ipy_escape_command.rs Formatter parentheses support for IpyEscapeCommand (#8207) 2023-10-25 14:01:50 +00:00
expr_lambda.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_list.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_list_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_name.rs Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
expr_named.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_none_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_number_literal.rs Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
expr_set.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_set_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_slice.rs Remove AstNode and AnyNode (#15479) 2025-01-17 17:11:00 -05:00
expr_starred.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_string_literal.rs Preserve multiline implicit concatenated strings in docstring positions (#15126) 2025-01-03 10:27:14 +01:00
expr_subscript.rs Remove AstNode and AnyNode (#15479) 2025-01-17 17:11:00 -05:00
expr_tuple.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
expr_unary_op.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_yield.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
expr_yield_from.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
mod.rs Fix curly bracket spacing around curly f-string expressions (#15471) 2025-01-15 09:22:47 +01:00
operator.rs Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
parentheses.rs Parenthesize match..case if guards (#13513) 2024-09-26 06:44:33 +00:00