mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +00:00
Simplify get_size2
usage (#19643)
## Summary These were added in the 0.5.0 release.
This commit is contained in:
parent
4739bc8d14
commit
8f8c39c435
18 changed files with 61 additions and 67 deletions
|
@ -641,7 +641,7 @@ fn place_cycle_initial<'db>(
|
|||
Place::bound(Type::Never).into()
|
||||
}
|
||||
|
||||
#[salsa::tracked(cycle_fn=place_cycle_recover, cycle_initial=place_cycle_initial, heap_size=get_size2::GetSize::get_heap_size)]
|
||||
#[salsa::tracked(cycle_fn=place_cycle_recover, cycle_initial=place_cycle_initial, heap_size=get_size2::heap_size)]
|
||||
fn place_by_id<'db>(
|
||||
db: &'db dyn Db,
|
||||
scope: ScopeId<'db>,
|
||||
|
@ -1368,7 +1368,7 @@ mod implicit_globals {
|
|||
/// Conceptually this function could be a `Set` rather than a list,
|
||||
/// but the number of symbols declared in this scope is likely to be very small,
|
||||
/// so the cost of hashing the names is likely to be more expensive than it's worth.
|
||||
#[salsa::tracked(returns(deref), heap_size=get_size2::GetSize::get_heap_size)]
|
||||
#[salsa::tracked(returns(deref), heap_size=get_size2::heap_size)]
|
||||
fn module_type_symbols<'db>(db: &'db dyn Db) -> smallvec::SmallVec<[ast::name::Name; 8]> {
|
||||
let Some(module_type) = KnownClass::ModuleType
|
||||
.to_class_literal(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue