Skip to content

Commit 403e926

Browse files
committed
---
yaml --- r: 113061 b: refs/heads/try c: d1ca0b1 h: refs/heads/master i: 113059: 41b49bf v: v3
1 parent 4e49559 commit 403e926

File tree

31 files changed

+242
-304
lines changed

31 files changed

+242
-304
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: 923a8f39caa4504b7825ff9f8ba0b875345ebf83
5+
refs/heads/try: d1ca0b13718f87f3f5498843f4e13d1b0b855c7e
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: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ 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-
// FIXME #12049
282-
if cfg!(test) { assert!(index < self.capacity) }
281+
debug_assert!(index < self.capacity);
283282

284283
let idx = index as int;
285284
let hash = unsafe { *self.hashes.offset(idx) };
@@ -306,8 +305,7 @@ mod table {
306305
let idx = index.idx;
307306

308307
unsafe {
309-
// FIXME #12049
310-
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
308+
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
311309
(&'a *self.keys.offset(idx),
312310
&'a *self.vals.offset(idx))
313311
}
@@ -319,8 +317,7 @@ mod table {
319317
let idx = index.idx;
320318

321319
unsafe {
322-
// FIXME #12049
323-
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
320+
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
324321
(&'a *self.keys.offset(idx),
325322
&'a mut *self.vals.offset(idx))
326323
}
@@ -332,8 +329,7 @@ mod table {
332329
let idx = index.idx;
333330

334331
unsafe {
335-
// FIXME #12049
336-
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
332+
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
337333
(transmute(self.hashes.offset(idx)),
338334
&'a mut *self.keys.offset(idx),
339335
&'a mut *self.vals.offset(idx))
@@ -351,8 +347,7 @@ mod table {
351347
let idx = index.idx;
352348

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

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

377371
*self.hashes.offset(idx) = EMPTY_BUCKET;
378372

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 * 10000) as libc::LARGE_INTEGER;
140+
let due = -(msecs as i64 * 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 * 10000) as libc::LARGE_INTEGER;
154+
let due = -(msecs as i64 * 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 * 10000) as libc::LARGE_INTEGER;
170+
let due = -(msecs as i64 * 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)