mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 17:40:37 +00:00
![]() ## Summary Per the suggestion in https://github.com/astral-sh/ruff/discussions/6183, this PR removes `AsyncWith`, `AsyncFor`, and `AsyncFunctionDef`, replacing them with an `is_async` field on the non-async variants of those structs. Unlike an interpreter, we _generally_ have identical handling for these nodes, so separating them into distinct variants adds complexity from which we don't really benefit. This can be seen below, where we get to remove a _ton_ of code related to adding generic `Any*` wrappers, and a ton of duplicate branches for these cases. ## Test Plan `cargo test` is unchanged, apart from parser snapshots. |
||
---|---|---|
.. | ||
analyze | ||
binding.rs | ||
context.rs | ||
definition.rs | ||
expressions.rs | ||
globals.rs | ||
lib.rs | ||
model.rs | ||
reference.rs | ||
scope.rs | ||
star_import.rs | ||
statements.rs |