ruff/crates/ruff_python_formatter/src/statement
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
..
clause.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
mod.rs Preserve trailing statement semicolons when using `fmt: skip` (#8273) 2023-10-30 00:07:14 +00:00
stmt_ann_assign.rs Ruff 2024.2 style (#9639) 2024-02-29 09:30:54 +01:00
stmt_assert.rs Ruff 2025 style guide (#13906) 2025-01-09 10:20:06 +01:00
stmt_assign.rs Ruff 2025 style guide (#13906) 2025-01-09 10:20:06 +01:00
stmt_aug_assign.rs Ruff 2024.2 style (#9639) 2024-02-29 09:30:54 +01:00
stmt_break.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_class_def.rs Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
stmt_continue.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_delete.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
stmt_expr.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_for.rs Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
stmt_function_def.rs Fix parentheses around return type annotations (#13381) 2024-09-20 09:23:53 +02:00
stmt_global.rs Remove `AstNode` and `AnyNode` (#15479) 2025-01-17 17:11:00 -05:00
stmt_if.rs Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
stmt_import.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_import_from.rs Remove `AstNode` and `AnyNode` (#15479) 2025-01-17 17:11:00 -05:00
stmt_ipy_escape_command.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_match.rs Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
stmt_nonlocal.rs Remove `AstNode` and `AnyNode` (#15479) 2025-01-17 17:11:00 -05:00
stmt_pass.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_raise.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_return.rs Implement RUF028 to detect useless formatter suppression comments (#9899) 2024-02-28 19:21:06 +00:00
stmt_try.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
stmt_type_alias.rs Ruff 2024.2 style (#9639) 2024-02-29 09:30:54 +01:00
stmt_while.rs Remove `AstNode` and `AnyNode` (#15479) 2025-01-17 17:11:00 -05:00
stmt_with.rs Remove `AstNode` and `AnyNode` (#15479) 2025-01-17 17:11:00 -05:00
suite.rs Join implicit concatenated strings when they fit on a line (#13663) 2024-10-24 11:52:22 +02:00