core: Demode sys
This commit is contained in:
parent
3480986408
commit
3e9284d128
@ -349,7 +349,7 @@ mod rt {
|
||||
return unsafe { pad(cv, s, PadFloat) };
|
||||
}
|
||||
pure fn conv_poly<T>(cv: Conv, v: T) -> ~str {
|
||||
let s = sys::log_str(v);
|
||||
let s = sys::log_str(&v);
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
|
||||
@ -555,7 +555,7 @@ mod rt2 {
|
||||
return unsafe { pad(cv, s, PadFloat) };
|
||||
}
|
||||
pure fn conv_poly<T>(cv: Conv, v: T) -> ~str {
|
||||
let s = sys::log_str(v);
|
||||
let s = sys::log_str(&v);
|
||||
return conv_str(cv, s);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
//! Misc low level stuff
|
||||
|
||||
// NB: transitionary, de-mode-ing.
|
||||
#[forbid(deprecated_mode)];
|
||||
#[forbid(deprecated_pattern)];
|
||||
|
||||
use cmp::{Eq, Ord};
|
||||
use libc::c_void;
|
||||
|
||||
@ -97,10 +101,10 @@ pure fn refcount<T>(+t: @T) -> uint {
|
||||
}
|
||||
}
|
||||
|
||||
pure fn log_str<T>(t: T) -> ~str {
|
||||
pure fn log_str<T>(t: &T) -> ~str {
|
||||
unsafe {
|
||||
do io::with_str_writer |wr| {
|
||||
repr::write_repr(wr, &t)
|
||||
repr::write_repr(wr, t)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
fn main() {
|
||||
let arr = [1,2,3]/3;
|
||||
let struc = {a: 13u8, b: arr, c: 42};
|
||||
let s = sys::log_str(struc);
|
||||
let s = sys::log_str(&struc);
|
||||
assert(s == ~"{ a: 13, b: [ 1, 2, 3 ], c: 42 }");
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
fn main() {
|
||||
let act = sys::log_str(~[1, 2, 3]);
|
||||
let act = sys::log_str(&~[1, 2, 3]);
|
||||
assert ~"~[ 1, 2, 3 ]" == act;
|
||||
|
||||
let act = fmt!("%?/%6?", ~[1, 2, 3], ~"hi");
|
||||
|
Loading…
x
Reference in New Issue
Block a user