Skip to content

Commit 9536ec3

Browse files
committed
---
yaml --- r: 179417 b: refs/heads/snap-stage3 c: 1ce8665 h: refs/heads/master i: 179415: a987399 v: v3
1 parent 228d36f commit 9536ec3

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 99f6206c4ea9ecaf61feb39521db5dd72cb717b0
4+
refs/heads/snap-stage3: 1ce86651c726d20e06038f3122e60cdd84e873e1
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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/snap-stage3/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)