[ty] Remove countme from salsa-structs (#19257)

This commit is contained in:
Micha Reiser 2025-07-10 13:45:09 +02:00 committed by GitHub
parent 934aaa23f3
commit 492f5bf2aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 20 additions and 67 deletions

View file

@ -29,7 +29,6 @@ bitflags = { workspace = true }
camino = { workspace = true }
colored = { workspace = true }
compact_str = { workspace = true }
countme = { workspace = true }
drop_bomb = { workspace = true }
get-size2 = { workspace = true }
indexmap = { workspace = true }

View file

@ -259,7 +259,7 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
.push(UseDefMapBuilder::new(is_class_scope));
let ast_id_scope = self.ast_ids.push(AstIdsBuilder::default());
let scope_id = ScopeId::new(self.db, self.file, file_scope_id, countme::Count::default());
let scope_id = ScopeId::new(self.db, self.file, file_scope_id);
self.scope_ids_by_scope.push(scope_id);
let previous = self.scopes_by_node.insert(node.node_key(), file_scope_id);
@ -495,7 +495,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
place,
kind,
is_reexported,
countme::Count::default(),
);
let num_definitions = {
@ -731,7 +730,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
subject,
kind,
guard,
countme::Count::default(),
);
let predicate = PredicateOrLiteral::Predicate(Predicate {
node: PredicateNode::Pattern(pattern_predicate),
@ -781,7 +779,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
AstNodeRef::new(self.module, expression_node),
assigned_to.map(|assigned_to| AstNodeRef::new(self.module, assigned_to)),
expression_kind,
countme::Count::default(),
);
self.expressions_by_node
.insert(expression_node.into(), expression);
@ -986,7 +983,6 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> {
// Note `target` belongs to the `self.module` tree
AstNodeRef::new(self.module, target),
UnpackValue::new(unpackable.kind(), value),
countme::Count::default(),
));
Some(unpackable.as_current_assignment(unpack))
}

View file

@ -40,8 +40,6 @@ pub struct Definition<'db> {
/// This is a dedicated field to avoid accessing `kind` to compute this value.
pub(crate) is_reexported: bool,
count: countme::Count<Definition<'static>>,
}
// The Salsa heap is tracked separately.

View file

@ -58,8 +58,6 @@ pub(crate) struct Expression<'db> {
/// Should this expression be inferred as a normal expression or a type expression?
pub(crate) kind: ExpressionKind,
count: countme::Count<Expression<'static>>,
}
// The Salsa heap is tracked separately.

View file

@ -441,8 +441,6 @@ pub struct ScopeId<'db> {
pub file: File,
pub file_scope_id: FileScopeId,
count: countme::Count<ScopeId<'static>>,
}
// The Salsa heap is tracked separately.

View file

@ -138,8 +138,6 @@ pub(crate) struct PatternPredicate<'db> {
pub(crate) kind: PatternPredicateKind<'db>,
pub(crate) guard: Option<Expression<'db>>,
count: countme::Count<PatternPredicate<'static>>,
}
// The Salsa heap is tracked separately.

View file

@ -44,8 +44,6 @@ pub(crate) struct Unpack<'db> {
/// The ingredient representing the value expression of the unpacking. For example, in
/// `(a, b) = (1, 2)`, the value expression is `(1, 2)`.
pub(crate) value: UnpackValue<'db>,
count: countme::Count<Unpack<'static>>,
}
impl<'db> Unpack<'db> {