Skip to content

Commit 4e49559

Browse files
committed
---
yaml --- r: 113060 b: refs/heads/try c: 923a8f3 h: refs/heads/master v: v3
1 parent 41b49bf commit 4e49559

File tree

32 files changed

+308
-242
lines changed

32 files changed

+308
-242
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: abdacecdf86b4b5a4f432560445a24e1c5f4751b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 922c420fcd4dfbfc7e3bce4dd20d9b17a20b39f3
5-
refs/heads/try: 3a321b001fd65ccbf34e626dbac6ab1ac2fa1ca3
5+
refs/heads/try: 923a8f39caa4504b7825ff9f8ba0b875345ebf83
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcollections/hashmap.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ mod table {
278278
/// the appropriate types to pass on to most of the other functions in
279279
/// this module.
280280
pub fn peek(&self, index: uint) -> BucketState {
281-
debug_assert!(index < self.capacity);
281+
// FIXME #12049
282+
if cfg!(test) { assert!(index < self.capacity) }
282283

283284
let idx = index as int;
284285
let hash = unsafe { *self.hashes.offset(idx) };
@@ -305,7 +306,8 @@ mod table {
305306
let idx = index.idx;
306307

307308
unsafe {
308-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
309+
// FIXME #12049
310+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
309311
(&'a *self.keys.offset(idx),
310312
&'a *self.vals.offset(idx))
311313
}
@@ -317,7 +319,8 @@ mod table {
317319
let idx = index.idx;
318320

319321
unsafe {
320-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
322+
// FIXME #12049
323+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
321324
(&'a *self.keys.offset(idx),
322325
&'a mut *self.vals.offset(idx))
323326
}
@@ -329,7 +332,8 @@ mod table {
329332
let idx = index.idx;
330333

331334
unsafe {
332-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
335+
// FIXME #12049
336+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
333337
(transmute(self.hashes.offset(idx)),
334338
&'a mut *self.keys.offset(idx),
335339
&'a mut *self.vals.offset(idx))
@@ -347,7 +351,8 @@ mod table {
347351
let idx = index.idx;
348352

349353
unsafe {
350-
debug_assert_eq!(*self.hashes.offset(idx), EMPTY_BUCKET);
354+
// FIXME #12049
355+
if cfg!(test) { assert_eq!(*self.hashes.offset(idx), EMPTY_BUCKET) }
351356
*self.hashes.offset(idx) = hash.inspect();
352357
move_val_init(&mut *self.keys.offset(idx), k);
353358
move_val_init(&mut *self.vals.offset(idx), v);
@@ -366,7 +371,8 @@ mod table {
366371
let idx = index.idx;
367372

368373
unsafe {
369-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
374+
// FIXME #12049
375+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
370376

371377
*self.hashes.offset(idx) = EMPTY_BUCKET;
372378

branches/try/src/libnative/io/timer_win32.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl rtio::RtioTimer for Timer {
137137

138138
// there are 10^6 nanoseconds in a millisecond, and the parameter is in
139139
// 100ns intervals, so we multiply by 10^4.
140-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
140+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
141141
assert_eq!(unsafe {
142142
imp::SetWaitableTimer(self.obj, &due, 0, ptr::null(),
143143
ptr::mut_null(), 0)
@@ -151,7 +151,7 @@ impl rtio::RtioTimer for Timer {
151151
let (tx, rx) = channel();
152152

153153
// see above for the calculation
154-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
154+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
155155
assert_eq!(unsafe {
156156
imp::SetWaitableTimer(self.obj, &due, 0, ptr::null(),
157157
ptr::mut_null(), 0)
@@ -167,7 +167,7 @@ impl rtio::RtioTimer for Timer {
167167
let (tx, rx) = channel();
168168

169169
// see above for the calculation
170-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
170+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
171171
assert_eq!(unsafe {
172172
imp::SetWaitableTimer(self.obj, &due, msecs as libc::LONG,
173173
ptr::null(), ptr::mut_null(), 0)

0 commit comments

Comments
 (0)