mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
Remove AST-node dependency from FunctionType
and ClassType
(#14087)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
9dddd73c29
commit
4323512a65
8 changed files with 230 additions and 113 deletions
|
@ -12,6 +12,18 @@ use crate::Db;
|
|||
/// involved. It allows us to:
|
||||
/// 1. Avoid doing structural match multiple times for each definition
|
||||
/// 2. Avoid highlighting the same error multiple times
|
||||
///
|
||||
/// ## Module-local type
|
||||
/// This type should not be used as part of any cross-module API because
|
||||
/// it holds a reference to the AST node. Range-offset changes
|
||||
/// then propagate through all usages, and deserialization requires
|
||||
/// reparsing the entire module.
|
||||
///
|
||||
/// E.g. don't use this type in:
|
||||
///
|
||||
/// * a return type of a cross-module query
|
||||
/// * a field of a type that is a return type of a cross-module query
|
||||
/// * an argument of a cross-module query
|
||||
#[salsa::tracked]
|
||||
pub(crate) struct Unpack<'db> {
|
||||
#[id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue