summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/item.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir/item.rs b/src/ir/item.rs
index 23090739..ecb86374 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -86,7 +86,8 @@ impl ItemId {
/// Allocate the next `ItemId`.
pub fn next() -> Self {
static NEXT_ITEM_ID: AtomicUsize = ATOMIC_USIZE_INIT;
- ItemId(NEXT_ITEM_ID.fetch_add(1, Ordering::Relaxed))
+ let next_id = NEXT_ITEM_ID.fetch_add(1, Ordering::Relaxed);
+ ItemId(next_id)
}
}