From a45d482a976a69aecd46dda0d29251dc73cb96d2 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 9 Oct 2018 18:00:27 -0400 Subject: [PATCH] more descriptive assertion failure for overflow --- src/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime.rs b/src/runtime.rs index a6c2a52d..e032453d 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -80,7 +80,7 @@ where } let old_revision = self.shared_state.revision.fetch_add(1, Ordering::SeqCst); - assert!(old_revision != usize::max_value()); + assert!(old_revision != usize::max_value(), "revision overflow"); let result = Revision { generation: 1 + old_revision as u64, };