fix: Fix expression scopes not being calculated for inline consts

This commit is contained in:
Lukas Wirth 2024-04-25 09:49:19 +02:00
parent ec941e599a
commit ac389ce2ef
7 changed files with 69 additions and 34 deletions

View file

@ -285,7 +285,7 @@ where
impl Default for LruIndex {
fn default() -> Self {
Self { index: AtomicUsize::new(std::usize::MAX) }
Self { index: AtomicUsize::new(usize::MAX) }
}
}
@ -299,11 +299,11 @@ impl LruIndex {
}
fn clear(&self) {
self.store(std::usize::MAX);
self.store(usize::MAX);
}
fn is_in_lru(&self) -> bool {
self.load() != std::usize::MAX
self.load() != usize::MAX
}
}

View file

@ -60,7 +60,7 @@ impl AtomicRevision {
/// Increment by 1, returning previous value.
pub(crate) fn fetch_then_increment(&self) -> Revision {
let v = self.data.fetch_add(1, Ordering::SeqCst);
assert!(v != u32::max_value(), "revision overflow");
assert!(v != u32::MAX, "revision overflow");
Revision::from(v)
}
}