mirror of https://github.com/astral-sh/ruff
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. |
||
|---|---|---|
| .. | ||
| mod.rs | ||
| pattern_arguments.rs | ||
| pattern_keyword.rs | ||
| pattern_match_as.rs | ||
| pattern_match_class.rs | ||
| pattern_match_mapping.rs | ||
| pattern_match_or.rs | ||
| pattern_match_sequence.rs | ||
| pattern_match_singleton.rs | ||
| pattern_match_star.rs | ||
| pattern_match_value.rs | ||