Skip to content

Commit 3f3a4d5

Browse files
committed
---
yaml --- r: 51675 b: refs/heads/incoming c: bbc4ca1 h: refs/heads/master i: 51673: cd01626 51671: a4b97fc v: v3
1 parent e05412d commit 3f3a4d5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: e5f8026ebab867547514677bf9d7c7870a4345ad
9+
refs/heads/incoming: bbc4ca134900456ba2a00368ec1f19bc1a357528
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/unstable/lang.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,12 @@ pub unsafe fn borrow_as_imm(a: *u8) {
9999
#[lang="return_to_mut"]
100100
#[inline(always)]
101101
pub unsafe fn return_to_mut(a: *u8) {
102-
let a: *mut BoxRepr = transmute(a);
103-
(*a).header.ref_count &= !FROZEN_BIT;
102+
// Sometimes the box is null, if it is conditionally frozen.
103+
// See e.g. #4904.
104+
if !a.is_null() {
105+
let a: *mut BoxRepr = transmute(a);
106+
(*a).header.ref_count &= !FROZEN_BIT;
107+
}
104108
}
105109

106110
#[lang="check_not_borrowed"]

branches/incoming/src/librustc/middle/typeck/check/regionck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ pub mod guarantor {
615615
// expressions, both of which always yield a region variable, so
616616
// mk_subr should never fail.
617617
let rptr_ty = rcx.resolve_node_type(id);
618-
if !ty::type_is_error(rptr_ty) {
618+
if !ty::type_is_error(rptr_ty) && !ty::type_is_bot(rptr_ty) {
619619
let tcx = rcx.fcx.ccx.tcx;
620620
debug!("rptr_ty=%s", ty_to_str(tcx, rptr_ty));
621621
let r = ty::ty_region(tcx, span, rptr_ty);

0 commit comments

Comments
 (0)