Skip to content

Commit 7b891c2

Browse files
committed
---
yaml --- r: 149519 b: refs/heads/try2 c: 9e8d5aa h: refs/heads/master i: 149517: 585c2aa 149515: fd4eb9d 149511: d436a5d 149503: 6a254f5 v: v3
1 parent 62986f2 commit 7b891c2

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 4cc723dc22e5ebcbac4dc431a82ea75bc9ae6017
8+
refs/heads/try2: 9e8d5aa29e40066b9c247ef252b58c2092ecdfae
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libarena/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,12 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
167167
// is necessary in order to properly do cleanup if a failure occurs
168168
// during an initializer.
169169
#[inline]
170-
unsafe fn bitpack_tydesc_ptr(p: *TyDesc, is_done: bool) -> uint {
171-
let p_bits: uint = transmute(p);
172-
p_bits | (is_done as uint)
170+
fn bitpack_tydesc_ptr(p: *TyDesc, is_done: bool) -> uint {
171+
p as uint | (is_done as uint)
173172
}
174173
#[inline]
175-
unsafe fn un_bitpack_tydesc_ptr(p: uint) -> (*TyDesc, bool) {
176-
(transmute(p & !1), p & 1 == 1)
174+
fn un_bitpack_tydesc_ptr(p: uint) -> (*TyDesc, bool) {
175+
((p & !1) as *TyDesc, p & 1 == 1)
177176
}
178177

179178
impl Arena {

branches/try2/src/libserialize/ebml.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ pub mod reader {
161161
];
162162

163163
unsafe {
164-
let (ptr, _): (*u8, uint) = transmute(data);
165-
let ptr = ptr.offset(start as int);
166-
let ptr: *i32 = transmute(ptr);
164+
let ptr = data.as_ptr().offset(start as int) as *i32;
167165
let val = from_be32(*ptr) as u32;
168166

169167
let i = (val >> 28u) as uint;

branches/try2/src/libstd/num/f32.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,8 @@ impl Float for f32 {
351351
static EXP_MASK: u32 = 0x7f800000;
352352
static MAN_MASK: u32 = 0x007fffff;
353353

354-
match (
355-
unsafe { ::cast::transmute::<f32,u32>(*self) } & MAN_MASK,
356-
unsafe { ::cast::transmute::<f32,u32>(*self) } & EXP_MASK,
357-
) {
354+
let bits: u32 = unsafe {::cast::transmute(*self)};
355+
match (bits & MAN_MASK, bits & EXP_MASK) {
358356
(0, 0) => FPZero,
359357
(_, 0) => FPSubnormal,
360358
(0, EXP_MASK) => FPInfinite,

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,8 @@ impl Float for f64 {
353353
static EXP_MASK: u64 = 0x7ff0000000000000;
354354
static MAN_MASK: u64 = 0x000fffffffffffff;
355355

356-
match (
357-
unsafe { ::cast::transmute::<f64,u64>(*self) } & MAN_MASK,
358-
unsafe { ::cast::transmute::<f64,u64>(*self) } & EXP_MASK,
359-
) {
356+
let bits: u64 = unsafe {::cast::transmute(*self)};
357+
match (bits & MAN_MASK, bits & EXP_MASK) {
360358
(0, 0) => FPZero,
361359
(_, 0) => FPSubnormal,
362360
(0, EXP_MASK) => FPInfinite,

0 commit comments

Comments
 (0)