Skip to content

Commit a833a49

Browse files
committed
Fix build with no-default-features
1 parent 48b4030 commit a833a49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stacked_borrows/stack.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ pub struct Stack {
4141

4242
impl Stack {
4343
pub fn retain(&mut self, tags: &FxHashSet<SbTag>) {
44-
#[cfg(feature = "stack-cache")]
4544
let mut first_removed = None;
4645

4746
let mut read_idx = 1;
@@ -73,6 +72,9 @@ impl Stack {
7372
}
7473
self.borrows.truncate(write_idx);
7574

75+
#[cfg(not(feature = "stack-cache"))]
76+
drop(first_removed); // This is only needed for the stack-cache
77+
7678
#[cfg(feature = "stack-cache")]
7779
if let Some(first_removed) = first_removed {
7880
// Either end of unique_range may have shifted, all we really know is that we can't

0 commit comments

Comments
 (0)