Skip to content

Commit 81ed8f9

Browse files
committed
---
yaml --- r: 233643 b: refs/heads/beta c: 64fcf3b h: refs/heads/master i: 233641: 294ef34 233639: 61bac9c v: v3
1 parent b622b27 commit 81ed8f9

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: c69c29bb530968e35069c53a573c80299ccc8ac8
26+
refs/heads/beta: 64fcf3b1a6a75e6cc1438589dbd8594c5c799b74
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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/beta/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)