ruff/crates/ruff_python_formatter/src
Ibraheem Ahmed 8531f4b3ca
[ty] Add infrastructure for AST garbage collection (#18445)
## Summary

https://github.com/astral-sh/ty/issues/214 will require a couple
invasive changes that I would like to get merged even before garbage
collection is fully implemented (to avoid rebasing):
- `ParsedModule` can no longer be dereferenced directly. Instead you
need to load a `ParsedModuleRef` to access the AST, which requires a
reference to the salsa database (as it may require re-parsing the AST if
it was collected).
- `AstNodeRef` can only be dereferenced with the `node` method, which
takes a reference to the `ParsedModuleRef`. This allows us to encode the
fact that ASTs do not live as long as the database and may be collected
as soon a given instance of a `ParsedModuleRef` is dropped. There are a
number of places where we currently merge the `'db` and `'ast`
lifetimes, so this requires giving some types/functions two separate
lifetime parameters.
2025-06-05 11:43:18 -04:00
..
comments Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
expression Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
module Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
other Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
pattern Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
snapshots Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
statement Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
string Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
type_param Remove AstNode and AnyNode (#15479) 2025-01-17 17:11:00 -05:00
builders.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
cli.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
context.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
db.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
generated.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
lib.rs [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00
main.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
options.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
prelude.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
preview.rs Don't add chaperone space after escaped quote in triple quote (#17216) 2025-04-11 10:21:47 +02:00
range.rs Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
shared_traits.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
verbatim.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00