Skip to content

Commit 815399d

Browse files
committed
---
yaml --- r: 174844 b: refs/heads/snap-stage3 c: 91cec5b h: refs/heads/master v: v3
1 parent 126058b commit 815399d

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: a0f86de49748b472d4d189d9688b0d856c000914
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e6f85c2f78bc0488c7cf08121b26dcbc85a846ba
4+
refs/heads/snap-stage3: 91cec5b57e1e0961d1f75ede168d37f4748f9478
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/liballoc/rc.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ use core::option::Option::{Some, None};
160160
use core::ptr::{self, PtrExt};
161161
use core::result::Result;
162162
use core::result::Result::{Ok, Err};
163-
use core::intrinsics::assume;
164163

165164
use heap::deallocate;
166165

@@ -752,20 +751,10 @@ trait RcBoxPtr<T> {
752751
fn strong(&self) -> uint { self.inner().strong.get() }
753752

754753
#[inline]
755-
fn inc_strong(&self) {
756-
let strong = self.strong();
757-
// The reference count is always at least one unless we're about to drop the type
758-
unsafe { assume(strong > 0); }
759-
self.inner().strong.set(strong + 1);
760-
}
754+
fn inc_strong(&self) { self.inner().strong.set(self.strong() + 1); }
761755

762756
#[inline]
763-
fn dec_strong(&self) {
764-
let strong = self.strong();
765-
// The reference count is always at least one unless we're about to drop the type
766-
unsafe { assume(strong > 0); }
767-
self.inner().strong.set(strong - 1);
768-
}
757+
fn dec_strong(&self) { self.inner().strong.set(self.strong() - 1); }
769758

770759
#[inline]
771760
fn weak(&self) -> uint { self.inner().weak.get() }

0 commit comments

Comments
 (0)