Skip to content

Commit 9725086

Browse files
committed
---
yaml --- r: 175639 b: refs/heads/auto c: ee253c9 h: refs/heads/master i: 175637: d86867b 175635: 9edf458 175631: b2d59fe v: v3
1 parent 0c3ee65 commit 9725086

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: ecbee2e56824161fcc0decd087055d13e0876058
13+
refs/heads/auto: ee253c918d2fb961dbdf5c6dbe40dd7fee20148e
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/liballoc/rc.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,6 @@ trait RcBoxPtr<T> {
755755
fn inc_strong(&self) {
756756
let strong = self.strong();
757757
// The reference count is always at least one unless we're about to drop the type
758-
// This allows the bulk of the destructor to be omitted in cases where we know that
759-
// the reference count must be > 0.
760758
unsafe { assume(strong > 0); }
761759
self.inner().strong.set(strong + 1);
762760
}
@@ -765,8 +763,6 @@ trait RcBoxPtr<T> {
765763
fn dec_strong(&self) {
766764
let strong = self.strong();
767765
// The reference count is always at least one unless we're about to drop the type
768-
// This allows the bulk of the destructor to be omitted in cases where we know that
769-
// the reference count must be > 0
770766
unsafe { assume(strong > 0); }
771767
self.inner().strong.set(strong - 1);
772768
}
@@ -786,9 +782,7 @@ impl<T> RcBoxPtr<T> for Rc<T> {
786782
fn inner(&self) -> &RcBox<T> {
787783
unsafe {
788784
// Safe to assume this here, as if it weren't true, we'd be breaking
789-
// the contract anyway.
790-
// This allows the null check to be elided in the destructor if we
791-
// manipulated the reference count in the same function.
785+
// the contract anyway
792786
assume(!self._ptr.is_null());
793787
&(**self._ptr)
794788
}
@@ -801,8 +795,6 @@ impl<T> RcBoxPtr<T> for Weak<T> {
801795
unsafe {
802796
// Safe to assume this here, as if it weren't true, we'd be breaking
803797
// the contract anyway
804-
// This allows the null check to be elided in the destructor if we
805-
// manipulated the reference count in the same function.
806798
assume(!self._ptr.is_null());
807799
&(**self._ptr)
808800
}

0 commit comments

Comments
 (0)