Skip to content

Commit ac40d53

Browse files
committed
libstd: Fix errors when rtdebug! is not a noop.
1 parent 61e741c commit ac40d53

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libstd/rt/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn run_in_newsched_task(f: ~fn()) {
5050
let on_exit: ~fn(bool) = |exit_status| rtassert!(exit_status);
5151
let mut task = ~Task::new_root(&mut sched.stack_pool,
5252
f.take());
53-
rtdebug!("newsched_task: %x", to_uint(task));
53+
rtdebug!("newsched_task: %x", ::borrow::to_uint(task));
5454
task.death.on_exit = Some(on_exit);
5555
sched.enqueue_task(task);
5656
sched.run();
@@ -145,7 +145,7 @@ pub fn spawntask(f: ~fn()) {
145145
}
146146
};
147147

148-
rtdebug!("new task pointer: %x", to_uint(task));
148+
rtdebug!("new task pointer: %x", ::borrow::to_uint(task));
149149

150150
let sched = Local::take::<Scheduler>();
151151
rtdebug!("spawntask scheduling the new task");

src/libstd/rt/uv/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub fn status_to_maybe_uv_error<T, U: Watcher + NativeHandle<*T>>(handle: U,
288288
None
289289
} else {
290290
unsafe {
291-
rtdebug!("handle: %x", handle as uint);
291+
rtdebug!("handle: %x", handle.native_handle() as uint);
292292
let loop_ = uvll::get_loop_for_uv_handle(handle.native_handle());
293293
rtdebug!("loop: %x", loop_ as uint);
294294
let err = uvll::last_error(loop_);

src/libstd/unstable/lang.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
7171
let mut alloc = ::ptr::null();
7272
do Local::borrow::<Task,()> |task| {
7373
rtdebug!("task pointer: %x, heap pointer: %x",
74-
to_uint(task),
75-
to_uint(&task.heap));
74+
::borrow::to_uint(task),
75+
::borrow::to_uint(&task.heap));
7676
alloc = task.heap.alloc(td as *c_void, size as uint) as *c_char;
7777
}
7878
return alloc;

0 commit comments

Comments
 (0)