Remove native types from stdlib
This commit is contained in:
parent
c6aead7281
commit
856a544d0c
@ -29,10 +29,10 @@ export recv;
|
||||
export chan::{};
|
||||
export port::{};
|
||||
|
||||
enum rust_port {}
|
||||
|
||||
#[abi = "cdecl"]
|
||||
native mod rustrt {
|
||||
type rust_port;
|
||||
|
||||
fn chan_id_send<T: send>(t: *sys::type_desc,
|
||||
target_task: task::task, target_port: port_id,
|
||||
data: T) -> ctypes::uintptr_t;
|
||||
@ -72,7 +72,7 @@ enum chan<T: send> {
|
||||
chan_t(task::task, port_id)
|
||||
}
|
||||
|
||||
resource port_ptr<T: send>(po: *rustrt::rust_port) {
|
||||
resource port_ptr<T: send>(po: *rust_port) {
|
||||
// Once the port is detached it's guaranteed not to receive further
|
||||
// messages
|
||||
rustrt::rust_port_detach(po);
|
||||
@ -127,13 +127,13 @@ fn recv<T: send>(p: port<T>) -> T { recv_(***p) }
|
||||
#[doc(
|
||||
brief = "Receive on a raw port pointer"
|
||||
)]
|
||||
fn recv_<T: send>(p: *rustrt::rust_port) -> T {
|
||||
fn recv_<T: send>(p: *rust_port) -> T {
|
||||
// FIXME: Due to issue 1185 we can't use a return pointer when
|
||||
// calling C code, and since we can't create our own return
|
||||
// pointer on the stack, we're going to call a little intrinsic
|
||||
// that will grab the value of the return pointer, then call this
|
||||
// function, which we will then use to call the runtime.
|
||||
fn recv(dptr: *uint, port: *rustrt::rust_port,
|
||||
fn recv(dptr: *uint, port: *rust_port,
|
||||
yield: *ctypes::uintptr_t,
|
||||
killed: *ctypes::uintptr_t) unsafe {
|
||||
rustrt::port_recv(dptr, port, yield, killed);
|
||||
|
@ -75,13 +75,7 @@ type uint32_t = u32;
|
||||
but using pointers to this type when interoperating \
|
||||
with C void pointers can help in documentation."
|
||||
)]
|
||||
enum void {
|
||||
// Making the only variant reference itself makes it impossible to
|
||||
// construct. Not exporting it makes it impossible to destructure.
|
||||
void_private(@void),
|
||||
// FIXME: #881
|
||||
void_private2(@void),
|
||||
}
|
||||
enum void {}
|
||||
|
||||
#[doc(
|
||||
brief = "A float value with the same size as a C `float`."
|
||||
|
@ -10,7 +10,7 @@ import core::ctypes::*;
|
||||
export libc;
|
||||
export libc_constants;
|
||||
export pipe;
|
||||
export fd_FILE;
|
||||
export FILE, fd_FILE;
|
||||
export close;
|
||||
export fclose;
|
||||
export waitpid;
|
||||
@ -24,16 +24,20 @@ export fsync_fd;
|
||||
// FIXME Somehow merge stuff duplicated here and macosx_os.rs. Made difficult
|
||||
// by https://github.com/graydon/rust/issues#issue/268
|
||||
|
||||
enum FILE_opaque {}
|
||||
type FILE = *FILE_opaque;
|
||||
enum dir {}
|
||||
enum dirent {}
|
||||
|
||||
#[nolink]
|
||||
#[abi = "cdecl"]
|
||||
native mod libc {
|
||||
fn read(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn write(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn open(s: str::sbuf, flags: c_int, mode: unsigned) -> fd_t;
|
||||
fn close(fd: fd_t) -> c_int;
|
||||
type FILE;
|
||||
fn fopen(path: str::sbuf, mode: str::sbuf) -> FILE;
|
||||
fn fdopen(fd: fd_t, mode: str::sbuf) -> FILE;
|
||||
fn fclose(f: FILE);
|
||||
@ -45,11 +49,9 @@ native mod libc {
|
||||
fn feof(f: FILE) -> c_int;
|
||||
fn fseek(f: FILE, offset: long, whence: c_int) -> c_int;
|
||||
fn ftell(f: FILE) -> long;
|
||||
type dir;
|
||||
fn opendir(d: str::sbuf) -> dir;
|
||||
fn closedir(d: dir) -> c_int;
|
||||
type dirent;
|
||||
fn readdir(d: dir) -> dirent;
|
||||
fn opendir(d: str::sbuf) -> *dir;
|
||||
fn closedir(d: *dir) -> c_int;
|
||||
fn readdir(d: *dir) -> *dirent;
|
||||
fn getenv(n: str::sbuf) -> str::sbuf;
|
||||
fn setenv(n: str::sbuf, v: str::sbuf, overwrite: c_int) -> c_int;
|
||||
fn unsetenv(n: str::sbuf) -> c_int;
|
||||
@ -90,7 +92,7 @@ fn pipe() -> {in: fd_t, out: fd_t} {
|
||||
ret {in: fds.in, out: fds.out};
|
||||
}
|
||||
|
||||
fn fd_FILE(fd: fd_t) -> libc::FILE {
|
||||
fn fd_FILE(fd: fd_t) -> FILE {
|
||||
ret str::as_buf("r", {|modebuf| libc::fdopen(fd, modebuf) });
|
||||
}
|
||||
|
||||
@ -98,7 +100,7 @@ fn close(fd: fd_t) -> c_int {
|
||||
libc::close(fd)
|
||||
}
|
||||
|
||||
fn fclose(file: libc::FILE) {
|
||||
fn fclose(file: FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,9 @@ import core::ctypes::c_int;
|
||||
|
||||
#[abi = "cdecl"]
|
||||
native mod rustrt {
|
||||
fn rust_get_stdin() -> os::libc::FILE;
|
||||
fn rust_get_stdout() -> os::libc::FILE;
|
||||
fn rust_get_stderr() -> os::libc::FILE;
|
||||
fn rust_get_stdin() -> os::FILE;
|
||||
fn rust_get_stdout() -> os::FILE;
|
||||
fn rust_get_stderr() -> os::FILE;
|
||||
}
|
||||
|
||||
// Reading
|
||||
@ -166,7 +166,7 @@ fn convert_whence(whence: seek_style) -> i32 {
|
||||
};
|
||||
}
|
||||
|
||||
impl of reader for os::libc::FILE {
|
||||
impl of reader for os::FILE {
|
||||
fn read_bytes(len: uint) -> [u8] unsafe {
|
||||
let buf = [];
|
||||
vec::reserve(buf, len);
|
||||
@ -195,9 +195,9 @@ impl <T: reader, C> of reader for {base: T, cleanup: C} {
|
||||
fn tell() -> uint { self.base.tell() }
|
||||
}
|
||||
|
||||
resource FILE_res(f: os::libc::FILE) { os::libc::fclose(f); }
|
||||
resource FILE_res(f: os::FILE) { os::libc::fclose(f); }
|
||||
|
||||
fn FILE_reader(f: os::libc::FILE, cleanup: bool) -> reader {
|
||||
fn FILE_reader(f: os::FILE, cleanup: bool) -> reader {
|
||||
if cleanup {
|
||||
{base: f, cleanup: FILE_res(f)} as reader
|
||||
} else {
|
||||
@ -282,7 +282,7 @@ impl <T: writer, C> of writer for {base: T, cleanup: C} {
|
||||
fn flush() -> int { self.base.flush() }
|
||||
}
|
||||
|
||||
impl of writer for os::libc::FILE {
|
||||
impl of writer for os::FILE {
|
||||
fn write(v: [const u8]) unsafe {
|
||||
let len = vec::len(v);
|
||||
let vbuf = vec::unsafe::to_ptr(v);
|
||||
@ -296,7 +296,7 @@ impl of writer for os::libc::FILE {
|
||||
fn flush() -> int { os::libc::fflush(self) as int }
|
||||
}
|
||||
|
||||
fn FILE_writer(f: os::libc::FILE, cleanup: bool) -> writer {
|
||||
fn FILE_writer(f: os::FILE, cleanup: bool) -> writer {
|
||||
if cleanup {
|
||||
{base: f, cleanup: FILE_res(f)} as writer
|
||||
} else {
|
||||
@ -532,10 +532,10 @@ mod fsync {
|
||||
// fsync file after executing blk
|
||||
// FIXME find better way to create resources within lifetime of outer res
|
||||
fn FILE_res_sync(&&file: FILE_res, opt_level: option<level>,
|
||||
blk: fn(&&res<os::libc::FILE>)) {
|
||||
blk: fn(&&res<os::FILE>)) {
|
||||
blk(res({
|
||||
val: *file, opt_level: opt_level,
|
||||
fsync_fn: fn@(&&file: os::libc::FILE, l: level) -> int {
|
||||
fsync_fn: fn@(&&file: os::FILE, l: level) -> int {
|
||||
ret os::fsync_fd(os::libc::fileno(file), l) as int;
|
||||
}
|
||||
}));
|
||||
|
@ -10,7 +10,7 @@ import core::ctypes::*;
|
||||
export libc;
|
||||
export libc_constants;
|
||||
export pipe;
|
||||
export fd_FILE;
|
||||
export FILE, fd_FILE;
|
||||
export close;
|
||||
export fclose;
|
||||
export waitpid;
|
||||
@ -24,16 +24,20 @@ export fsync_fd;
|
||||
// FIXME Somehow merge stuff duplicated here and macosx_os.rs. Made difficult
|
||||
// by https://github.com/graydon/rust/issues#issue/268
|
||||
|
||||
enum FILE_opaque {}
|
||||
type FILE = *FILE_opaque;
|
||||
enum dir {}
|
||||
enum dirent {}
|
||||
|
||||
#[nolink]
|
||||
#[abi = "cdecl"]
|
||||
native mod libc {
|
||||
fn read(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn write(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn open(s: str::sbuf, flags: c_int, mode: unsigned) -> fd_t;
|
||||
fn close(fd: fd_t) -> c_int;
|
||||
type FILE;
|
||||
fn fopen(path: str::sbuf, mode: str::sbuf) -> FILE;
|
||||
fn fdopen(fd: fd_t, mode: str::sbuf) -> FILE;
|
||||
fn fclose(f: FILE);
|
||||
@ -46,11 +50,9 @@ native mod libc {
|
||||
fn feof(f: FILE) -> c_int;
|
||||
fn fseek(f: FILE, offset: long, whence: c_int) -> c_int;
|
||||
fn ftell(f: FILE) -> long;
|
||||
type dir;
|
||||
fn opendir(d: str::sbuf) -> dir;
|
||||
fn closedir(d: dir) -> c_int;
|
||||
type dirent;
|
||||
fn readdir(d: dir) -> dirent;
|
||||
fn opendir(d: str::sbuf) -> *dir;
|
||||
fn closedir(d: *dir) -> c_int;
|
||||
fn readdir(d: *dir) -> *dirent;
|
||||
fn getenv(n: str::sbuf) -> str::sbuf;
|
||||
fn setenv(n: str::sbuf, v: str::sbuf, overwrite: c_int) -> c_int;
|
||||
fn unsetenv(n: str::sbuf) -> c_int;
|
||||
@ -83,7 +85,7 @@ fn pipe() -> {in: fd_t, out: fd_t} {
|
||||
ret {in: fds.in, out: fds.out};
|
||||
}
|
||||
|
||||
fn fd_FILE(fd: fd_t) -> libc::FILE {
|
||||
fn fd_FILE(fd: fd_t) -> FILE {
|
||||
ret str::as_buf("r", {|modebuf| libc::fdopen(fd, modebuf) });
|
||||
}
|
||||
|
||||
@ -91,7 +93,7 @@ fn close(fd: fd_t) -> c_int {
|
||||
libc::close(fd)
|
||||
}
|
||||
|
||||
fn fclose(file: libc::FILE) {
|
||||
fn fclose(file: FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import core::ctypes::*;
|
||||
export libc;
|
||||
export libc_constants;
|
||||
export pipe;
|
||||
export fd_FILE;
|
||||
export FILE, fd_FILE;
|
||||
export close;
|
||||
export fclose;
|
||||
export waitpid;
|
||||
@ -18,16 +18,20 @@ export fsync_fd;
|
||||
// FIXME Refactor into unix_os module or some such. Doesn't
|
||||
// seem to work right now.
|
||||
|
||||
enum FILE_opaque {}
|
||||
type FILE = *FILE_opaque;
|
||||
enum dir {}
|
||||
enum dirent {}
|
||||
|
||||
#[nolink]
|
||||
#[abi = "cdecl"]
|
||||
native mod libc {
|
||||
fn read(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn write(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn open(s: str::sbuf, flags: c_int, mode: unsigned) -> fd_t;
|
||||
fn close(fd: fd_t) -> c_int;
|
||||
type FILE;
|
||||
fn fopen(path: str::sbuf, mode: str::sbuf) -> FILE;
|
||||
fn fdopen(fd: fd_t, mode: str::sbuf) -> FILE;
|
||||
fn fflush(f: FILE) -> c_int;
|
||||
@ -39,11 +43,9 @@ native mod libc {
|
||||
fn feof(f: FILE) -> c_int;
|
||||
fn fseek(f: FILE, offset: long, whence: c_int) -> c_int;
|
||||
fn ftell(f: FILE) -> long;
|
||||
type dir;
|
||||
fn opendir(d: str::sbuf) -> dir;
|
||||
fn closedir(d: dir) -> c_int;
|
||||
type dirent;
|
||||
fn readdir(d: dir) -> dirent;
|
||||
fn opendir(d: str::sbuf) -> *dir;
|
||||
fn closedir(d: *dir) -> c_int;
|
||||
fn readdir(d: *dir) -> *dirent;
|
||||
fn getenv(n: str::sbuf) -> str::sbuf;
|
||||
fn setenv(n: str::sbuf, v: str::sbuf, overwrite: c_int) -> c_int;
|
||||
fn unsetenv(n: str::sbuf) -> c_int;
|
||||
@ -80,7 +82,7 @@ fn pipe() -> {in: fd_t, out: fd_t} {
|
||||
ret {in: fds.in, out: fds.out};
|
||||
}
|
||||
|
||||
fn fd_FILE(fd: fd_t) -> libc::FILE {
|
||||
fn fd_FILE(fd: fd_t) -> FILE {
|
||||
ret str::as_buf("r", {|modebuf| libc::fdopen(fd, modebuf) });
|
||||
}
|
||||
|
||||
@ -88,7 +90,7 @@ fn close(fd: fd_t) -> c_int {
|
||||
libc::close(fd)
|
||||
}
|
||||
|
||||
fn fclose(file: libc::FILE) {
|
||||
fn fclose(file: FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,14 @@ Module: rand
|
||||
|
||||
Random number generation
|
||||
*/
|
||||
|
||||
enum rctx {}
|
||||
|
||||
#[abi = "cdecl"]
|
||||
native mod rustrt {
|
||||
type rctx;
|
||||
fn rand_new() -> rctx;
|
||||
fn rand_next(c: rctx) -> u32;
|
||||
fn rand_free(c: rctx);
|
||||
fn rand_new() -> *rctx;
|
||||
fn rand_next(c: *rctx) -> u32;
|
||||
fn rand_free(c: *rctx);
|
||||
}
|
||||
|
||||
/* Section: Types */
|
||||
@ -48,7 +50,7 @@ iface rng {
|
||||
fn gen_bytes(len: uint) -> [u8];
|
||||
}
|
||||
|
||||
resource rand_res(c: rustrt::rctx) { rustrt::rand_free(c); }
|
||||
resource rand_res(c: *rctx) { rustrt::rand_free(c); }
|
||||
|
||||
/* Section: Operations */
|
||||
|
||||
|
@ -171,8 +171,8 @@ fn start_program(prog: str, args: [str]) -> program {
|
||||
|
||||
type prog_repr = {pid: pid_t,
|
||||
mutable in_fd: fd_t,
|
||||
out_file: os::libc::FILE,
|
||||
err_file: os::libc::FILE,
|
||||
out_file: os::FILE,
|
||||
err_file: os::FILE,
|
||||
mutable finished: bool};
|
||||
|
||||
fn close_repr_input(r: prog_repr) {
|
||||
|
@ -1,18 +1,20 @@
|
||||
import core::option;
|
||||
import core::ctypes::*;
|
||||
|
||||
enum FILE_opaque {}
|
||||
type FILE = *FILE_opaque;
|
||||
|
||||
#[abi = "cdecl"]
|
||||
#[nolink]
|
||||
native mod libc {
|
||||
fn read(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn write(fd: fd_t, buf: *u8, count: size_t) -> ssize_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: libc::FILE) -> size_t;
|
||||
fn fread(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
fn fwrite(buf: *u8, size: size_t, n: size_t, f: FILE) -> size_t;
|
||||
#[link_name = "_open"]
|
||||
fn open(s: str::sbuf, flags: c_int, mode: unsigned) -> c_int;
|
||||
#[link_name = "_close"]
|
||||
fn close(fd: fd_t) -> c_int;
|
||||
type FILE;
|
||||
fn fopen(path: str::sbuf, mode: str::sbuf) -> FILE;
|
||||
fn _fdopen(fd: fd_t, mode: str::sbuf) -> FILE;
|
||||
fn fclose(f: FILE);
|
||||
@ -46,9 +48,10 @@ type HMODULE = uint;
|
||||
type LPTSTR = str::sbuf;
|
||||
type LPCTSTR = str::sbuf;
|
||||
|
||||
type LPSECURITY_ATTRIBUTES = *ctypes::void;
|
||||
|
||||
#[abi = "stdcall"]
|
||||
native mod kernel32 {
|
||||
type LPSECURITY_ATTRIBUTES;
|
||||
fn GetEnvironmentVariableA(n: str::sbuf, v: str::sbuf, nsize: uint) ->
|
||||
uint;
|
||||
fn SetEnvironmentVariableA(n: str::sbuf, v: str::sbuf) -> int;
|
||||
@ -84,7 +87,7 @@ fn pipe() -> {in: fd_t, out: fd_t} {
|
||||
ret {in: fds.in, out: fds.out};
|
||||
}
|
||||
|
||||
fn fd_FILE(fd: fd_t) -> libc::FILE {
|
||||
fn fd_FILE(fd: fd_t) -> FILE {
|
||||
ret str::as_buf("r", {|modebuf| libc::_fdopen(fd, modebuf) });
|
||||
}
|
||||
|
||||
@ -92,7 +95,7 @@ fn close(fd: fd_t) -> c_int {
|
||||
libc::close(fd)
|
||||
}
|
||||
|
||||
fn fclose(file: libc::FILE) {
|
||||
fn fclose(file: FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
// error-pattern:expected `sbuf` but found `FILE`
|
||||
use std;
|
||||
|
||||
fn main() unsafe {
|
||||
let f: std::os::libc::FILE = std::io::rustrt::rust_get_stdin();
|
||||
std::os::libc::fopen(f, f);
|
||||
}
|
@ -4,5 +4,5 @@ use std;
|
||||
import std::os;
|
||||
|
||||
fn main() {
|
||||
log(debug, 1.0 as os::libc::FILE); // Can't cast float to native.
|
||||
log(debug, 1.0 as os::FILE); // Can't cast float to native.
|
||||
}
|
||||
|
@ -162,9 +162,6 @@ mod test_native_items {
|
||||
native mod rustrt {
|
||||
#[attr];
|
||||
|
||||
#[attr]
|
||||
type sbuf;
|
||||
|
||||
#[attr]
|
||||
fn unsupervise();
|
||||
}
|
||||
|
@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
#[abi = "cdecl"]
|
||||
#[nolink]
|
||||
native mod libc {
|
||||
type file_handle;
|
||||
}
|
||||
|
||||
fn main() { assert (true); }
|
@ -2,7 +2,7 @@ use std;
|
||||
import std::os;
|
||||
|
||||
fn main() {
|
||||
let f = 1 as os::libc::FILE;
|
||||
let f = 1 as os::FILE;
|
||||
log(debug, f as int);
|
||||
log(debug, f as uint);
|
||||
log(debug, f as i8);
|
||||
@ -18,7 +18,7 @@ fn main() {
|
||||
log(debug, 1 as uint);
|
||||
log(debug, 1 as float);
|
||||
log(debug, 1 as bool);
|
||||
log(debug, 1 as os::libc::FILE);
|
||||
log(debug, 1 as os::FILE);
|
||||
log(debug, 1 as i8);
|
||||
log(debug, 1 as i16);
|
||||
log(debug, 1 as i32);
|
||||
@ -34,7 +34,7 @@ fn main() {
|
||||
log(debug, 1u as uint);
|
||||
log(debug, 1u as float);
|
||||
log(debug, 1u as bool);
|
||||
log(debug, 1u as os::libc::FILE);
|
||||
log(debug, 1u as os::FILE);
|
||||
log(debug, 1u as i8);
|
||||
log(debug, 1u as i16);
|
||||
log(debug, 1u as i32);
|
||||
@ -50,7 +50,7 @@ fn main() {
|
||||
log(debug, 1i8 as uint);
|
||||
log(debug, 1i8 as float);
|
||||
log(debug, 1i8 as bool);
|
||||
log(debug, 1i8 as os::libc::FILE);
|
||||
log(debug, 1i8 as os::FILE);
|
||||
log(debug, 1i8 as i8);
|
||||
log(debug, 1i8 as i16);
|
||||
log(debug, 1i8 as i32);
|
||||
@ -66,7 +66,7 @@ fn main() {
|
||||
log(debug, 1u8 as uint);
|
||||
log(debug, 1u8 as float);
|
||||
log(debug, 1u8 as bool);
|
||||
log(debug, 1u8 as os::libc::FILE);
|
||||
log(debug, 1u8 as os::FILE);
|
||||
log(debug, 1u8 as i8);
|
||||
log(debug, 1u8 as i16);
|
||||
log(debug, 1u8 as i32);
|
||||
@ -82,7 +82,7 @@ fn main() {
|
||||
log(debug, 1i16 as uint);
|
||||
log(debug, 1i16 as float);
|
||||
log(debug, 1i16 as bool);
|
||||
log(debug, 1i16 as os::libc::FILE);
|
||||
log(debug, 1i16 as os::FILE);
|
||||
log(debug, 1i16 as i8);
|
||||
log(debug, 1i16 as i16);
|
||||
log(debug, 1i16 as i32);
|
||||
@ -98,7 +98,7 @@ fn main() {
|
||||
log(debug, 1u16 as uint);
|
||||
log(debug, 1u16 as float);
|
||||
log(debug, 1u16 as bool);
|
||||
log(debug, 1u16 as os::libc::FILE);
|
||||
log(debug, 1u16 as os::FILE);
|
||||
log(debug, 1u16 as i8);
|
||||
log(debug, 1u16 as i16);
|
||||
log(debug, 1u16 as i32);
|
||||
@ -114,7 +114,7 @@ fn main() {
|
||||
log(debug, 1i32 as uint);
|
||||
log(debug, 1i32 as float);
|
||||
log(debug, 1i32 as bool);
|
||||
log(debug, 1i32 as os::libc::FILE);
|
||||
log(debug, 1i32 as os::FILE);
|
||||
log(debug, 1i32 as i8);
|
||||
log(debug, 1i32 as i16);
|
||||
log(debug, 1i32 as i32);
|
||||
@ -130,7 +130,7 @@ fn main() {
|
||||
log(debug, 1u32 as uint);
|
||||
log(debug, 1u32 as float);
|
||||
log(debug, 1u32 as bool);
|
||||
log(debug, 1u32 as os::libc::FILE);
|
||||
log(debug, 1u32 as os::FILE);
|
||||
log(debug, 1u32 as i8);
|
||||
log(debug, 1u32 as i16);
|
||||
log(debug, 1u32 as i32);
|
||||
@ -146,7 +146,7 @@ fn main() {
|
||||
log(debug, 1i64 as uint);
|
||||
log(debug, 1i64 as float);
|
||||
log(debug, 1i64 as bool);
|
||||
log(debug, 1i64 as os::libc::FILE);
|
||||
log(debug, 1i64 as os::FILE);
|
||||
log(debug, 1i64 as i8);
|
||||
log(debug, 1i64 as i16);
|
||||
log(debug, 1i64 as i32);
|
||||
@ -162,7 +162,7 @@ fn main() {
|
||||
log(debug, 1u64 as uint);
|
||||
log(debug, 1u64 as float);
|
||||
log(debug, 1u64 as bool);
|
||||
log(debug, 1u64 as os::libc::FILE);
|
||||
log(debug, 1u64 as os::FILE);
|
||||
log(debug, 1u64 as i8);
|
||||
log(debug, 1u64 as i16);
|
||||
log(debug, 1u64 as i32);
|
||||
@ -178,7 +178,7 @@ fn main() {
|
||||
log(debug, 1u64 as uint);
|
||||
log(debug, 1u64 as float);
|
||||
log(debug, 1u64 as bool);
|
||||
log(debug, 1u64 as os::libc::FILE);
|
||||
log(debug, 1u64 as os::FILE);
|
||||
log(debug, 1u64 as i8);
|
||||
log(debug, 1u64 as i16);
|
||||
log(debug, 1u64 as i32);
|
||||
@ -194,7 +194,7 @@ fn main() {
|
||||
log(debug, true as uint);
|
||||
log(debug, true as float);
|
||||
log(debug, true as bool);
|
||||
log(debug, true as os::libc::FILE);
|
||||
log(debug, true as os::FILE);
|
||||
log(debug, true as i8);
|
||||
log(debug, true as i16);
|
||||
log(debug, true as i32);
|
||||
|
Loading…
x
Reference in New Issue
Block a user