Skip to content

Commit c0f542c

Browse files
committed
---
yaml --- r: 186239 b: refs/heads/try c: 1ce8665 h: refs/heads/master i: 186237: a132222 186235: 8ca21d4 186231: 63f084a 186223: 595b05f 186207: a2c64e1 186175: ce01dcf 186111: 43216e1 v: v3
1 parent a465fe2 commit c0f542c

File tree

3 files changed

+22
-30
lines changed

3 files changed

+22
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 99f6206c4ea9ecaf61feb39521db5dd72cb717b0
5+
refs/heads/try: 1ce86651c726d20e06038f3122e60cdd84e873e1
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/mk/tests.mk

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,13 @@ ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
260260
,$(ALL_HS))
261261

262262
# Run the tidy script in multiple parts to avoid huge 'echo' commands
263-
tidy:
263+
.PHONY: tidy
264+
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
265+
266+
endif
267+
268+
.PHONY: tidy-basic
269+
tidy-basic:
264270
@$(call E, check: formatting)
265271
$(Q)find $(S)src -name '*.r[sc]' \
266272
-and -not -regex '^$(S)src/jemalloc.*' \
@@ -286,6 +292,10 @@ tidy:
286292
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287293
$(Q)echo $(ALL_HS) \
288294
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
295+
296+
.PHONY: tidy-binaries
297+
tidy-binaries:
298+
@$(call E, check: binaries)
289299
$(Q)find $(S)src -type f -perm +a+x \
290300
-not -name '*.rs' -and -not -name '*.py' \
291301
-and -not -name '*.sh' \
@@ -300,11 +310,16 @@ tidy:
300310
| grep '^$(S)src/libbacktrace' -v \
301311
| grep '^$(S)src/rust-installer' -v \
302312
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303-
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
304-
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
305313

314+
.PHONY: tidy-errors
315+
tidy-errors:
316+
@$(call E, check: extended errors)
317+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
306318

307-
endif
319+
.PHONY: tidy-features
320+
tidy-features:
321+
@$(call E, check: feature sanity)
322+
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
308323

309324

310325
######################################################################

branches/try/src/liballoc/rc.rs

Lines changed: 2 additions & 25 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

@@ -770,34 +769,12 @@ trait RcBoxPtr<T> {
770769

771770
impl<T> RcBoxPtr<T> for Rc<T> {
772771
#[inline(always)]
773-
fn inner(&self) -> &RcBox<T> {
774-
unsafe {
775-
// Safe to assume this here, as if it weren't true, we'd be breaking
776-
// the contract anyway.
777-
// This allows the null check to be elided in the destructor if we
778-
// manipulated the reference count in the same function.
779-
if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
780-
assume(!self._ptr.is_null());
781-
}
782-
&(**self._ptr)
783-
}
784-
}
772+
fn inner(&self) -> &RcBox<T> { unsafe { &(**self._ptr) } }
785773
}
786774

787775
impl<T> RcBoxPtr<T> for Weak<T> {
788776
#[inline(always)]
789-
fn inner(&self) -> &RcBox<T> {
790-
unsafe {
791-
// Safe to assume this here, as if it weren't true, we'd be breaking
792-
// the contract anyway.
793-
// This allows the null check to be elided in the destructor if we
794-
// manipulated the reference count in the same function.
795-
if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
796-
assume(!self._ptr.is_null());
797-
}
798-
&(**self._ptr)
799-
}
800-
}
777+
fn inner(&self) -> &RcBox<T> { unsafe { &(**self._ptr) } }
801778
}
802779

803780
#[cfg(test)]

0 commit comments

Comments
 (0)