ruff/crates/red_knot_python_semantic
Dhruv Manilawala 34b6a9b909
Remove unpack field from SemanticIndexBuilder (#14101)
## Summary

Related to
https://github.com/astral-sh/ruff/pull/13979#discussion_r1828305790,
this PR removes the `current_unpack` state field from
`SemanticIndexBuilder` and passes the `Unpack` ingredient via the
`CurrentAssignment` -> `DefinitionNodeRef` conversion to finally store
it on `DefintionNodeKind`.

This involves updating the lifetime of `AnyParameterRef` (parameter to
`declare_parameter`) to use the `'db` lifetime. Currently, all AST nodes
stored on various enums are marked with `'a` lifetime but they're always
utilized using the `'db` lifetime.

This also removes the dedicated `'a` lifetime parameter on
`add_definition` which is currently being used in `DefinitionNodeRef`.
As mentioned, all AST nodes live through the `'db` lifetime so we can
remove the `'a` lifetime parameter from that method and use the `'db`
lifetime instead.
2024-11-06 08:42:58 +05:30
..
resources [red-knot] Store starred-expression annotation types (#14106) 2024-11-05 20:25:45 +01:00
src Remove unpack field from SemanticIndexBuilder (#14101) 2024-11-06 08:42:58 +05:30
tests [red-knot] Cleanup generated names of mdtest tests (#13831) 2024-10-20 15:11:53 +00:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml Avoid cloning Name when looking up function and class types (#14092) 2024-11-04 15:52:59 +01:00