Skip to content

Commit 1acc550

Browse files
committed
---
yaml --- r: 232644 b: refs/heads/try c: 64fcf3b h: refs/heads/master v: v3
1 parent a1aa6d8 commit 1acc550

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
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: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: c69c29bb530968e35069c53a573c80299ccc8ac8
4+
refs/heads/try: 64fcf3b1a6a75e6cc1438589dbd8594c5c799b74
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_data_structures/transitive_relation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<T:Debug+PartialEq> TransitiveRelation<T> {
110110
/// (there are corresponding tests below, btw). In each case,
111111
/// the query is `postdom_upper_bound(a, b)`:
112112
///
113-
/// ```text
113+
/// ```
114114
/// // returns Some(x), which is also LUB
115115
/// a -> a1 -> x
116116
/// ^

branches/try/src/librustc_trans/trans/base.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,14 @@ pub fn call_lifetime_start(cx: Block, ptr: ValueRef) {
917917
let _icx = push_ctxt("lifetime_start");
918918
let ccx = cx.ccx();
919919

920-
let llsize = C_u64(ccx, machine::llsize_of_alloc(ccx, val_ty(ptr).element_type()));
920+
let size = machine::llsize_of_alloc(ccx, val_ty(ptr).element_type());
921+
if size == 0 {
922+
return;
923+
}
924+
921925
let ptr = PointerCast(cx, ptr, Type::i8p(ccx));
922926
let lifetime_start = ccx.get_intrinsic(&"llvm.lifetime.start");
923-
Call(cx, lifetime_start, &[llsize, ptr], None, DebugLoc::None);
927+
Call(cx, lifetime_start, &[C_u64(ccx, size), ptr], None, DebugLoc::None);
924928
}
925929

926930
pub fn call_lifetime_end(cx: Block, ptr: ValueRef) {
@@ -931,10 +935,14 @@ pub fn call_lifetime_end(cx: Block, ptr: ValueRef) {
931935
let _icx = push_ctxt("lifetime_end");
932936
let ccx = cx.ccx();
933937

934-
let llsize = C_u64(ccx, machine::llsize_of_alloc(ccx, val_ty(ptr).element_type()));
938+
let size = machine::llsize_of_alloc(ccx, val_ty(ptr).element_type());
939+
if size == 0 {
940+
return;
941+
}
942+
935943
let ptr = PointerCast(cx, ptr, Type::i8p(ccx));
936944
let lifetime_end = ccx.get_intrinsic(&"llvm.lifetime.end");
937-
Call(cx, lifetime_end, &[llsize, ptr], None, DebugLoc::None);
945+
Call(cx, lifetime_end, &[C_u64(ccx, size), ptr], None, DebugLoc::None);
938946
}
939947

940948
pub fn call_memcpy(cx: Block, dst: ValueRef, src: ValueRef, n_bytes: ValueRef, align: u32) {
@@ -956,11 +964,6 @@ pub fn memcpy_ty<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
956964
t: Ty<'tcx>) {
957965
let _icx = push_ctxt("memcpy_ty");
958966
let ccx = bcx.ccx();
959-
960-
if type_is_zero_size(ccx, t) {
961-
return;
962-
}
963-
964967
if t.is_structural() {
965968
let llty = type_of::type_of(ccx, t);
966969
let llsz = llsize_of(ccx, llty);

branches/try/src/libstd/num/f64.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,7 @@ impl f64 {
454454
#[stable(feature = "rust1", since = "1.0.0")]
455455
#[inline]
456456
pub fn sqrt(self) -> f64 {
457-
if self < 0.0 {
458-
NAN
459-
} else {
460-
unsafe { intrinsics::sqrtf64(self) }
461-
}
457+
unsafe { intrinsics::sqrtf64(self) }
462458
}
463459

464460
/// Returns `e^(self)`, (the exponential function).

0 commit comments

Comments
 (0)