mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Fix expression scopes not being calculated for inline consts
This commit is contained in:
parent
ec941e599a
commit
ac389ce2ef
7 changed files with 69 additions and 34 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue