From d11a6766ad388c97e3a95b26a9350ff4ddefd004 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 3 Dec 2018 10:26:39 +0100 Subject: [PATCH] use assert --- src/stacked_borrows.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index a90be317705a..41b5cc2a239d 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -322,9 +322,7 @@ impl<'tcx> Stack { } return; } - if self.frozen_since.is_some() { - bug!("Trying to create non-frozen reference to frozen location"); - } + assert!(self.frozen_since.is_none(), "Trying to create non-frozen reference to frozen location"); // Push new item to the stack. let itm = match bor {