diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 16:16:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 21:26:48 -0800 |
| commit | a64000820f0fc32be4d7535a9a92418a434fa4ba (patch) | |
| tree | 916024d35e08f0826c20654f629ec596b5cb1f14 /src/libstd | |
| parent | 24ccb34266c93a21b4cd1bef473c56087689c079 (diff) | |
More test fixes
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/bitflags.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 3 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 2 | ||||
| -rw-r--r-- | src/libstd/fmt.rs | 6 | ||||
| -rw-r--r-- | src/libstd/io/fs.rs | 56 | ||||
| -rw-r--r-- | src/libstd/io/net/tcp.rs | 6 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/macros.rs | 4 | ||||
| -rw-r--r-- | src/libstd/os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path/posix.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 11 | ||||
| -rw-r--r-- | src/libstd/rand/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/c.rs | 39 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread.rs | 2 |
15 files changed, 70 insertions, 71 deletions
diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs index ed3f2cbe1a1..5764962b51b 100644 --- a/src/libstd/bitflags.rs +++ b/src/libstd/bitflags.rs @@ -71,7 +71,7 @@ /// let mut flags = FLAG_A | FLAG_B; /// flags.clear(); /// assert!(flags.is_empty()); -/// assert_eq!(format!("{}", flags).as_slice(), "hi!"); +/// assert_eq!(format!("{:?}", flags).as_slice(), "hi!"); /// } /// ``` /// diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a329c7dd90e..2011c03c773 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1894,7 +1894,8 @@ mod test_map { let map_str = format!("{:?}", map); - assert!(map_str == "HashMap {1i: 2i, 3i: 4i}" || map_str == "{3i: 4i, 1i: 2i}"); + assert!(map_str == "HashMap {1i: 2i, 3i: 4i}" || + map_str == "HashMap {3i: 4i, 1i: 2i}"); assert_eq!(format!("{:?}", empty), "HashMap {}"); } diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 8eaa112f0a1..f66e5384942 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1130,7 +1130,7 @@ mod test_set { let set_str = format!("{:?}", set); - assert!(set_str == "HashSet {1i, 2i}" || set_str == "{2i, 1i}"); + assert!(set_str == "HashSet {1i, 2i}" || set_str == "HashSet {2i, 1i}"); assert_eq!(format!("{:?}", empty), "HashSet {}"); } diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index d014f67172c..14b80045a9a 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -230,9 +230,9 @@ //! Some examples of the output from both traits: //! //! ``` -//! assert_eq(format!("{} {:?}", 3i32, 4i32), "3 4i32"); -//! assert_eq(format!("{} {:?}", 'a', 'b'), "a 'b'"); -//! assert_eq(format!("{} {:?}", "foo\n", "bar\n"), "foo\n \"bar\\n\""); +//! assert_eq!(format!("{} {:?}", 3i32, 4i32), "3 4i32"); +//! assert_eq!(format!("{} {:?}", 'a', 'b'), "a 'b'"); +//! assert_eq!(format!("{} {:?}", "foo\n", "bar\n"), "foo\n \"bar\\n\""); //! ``` //! //! ### Related macros diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index 1556ef43eb7..eadca8e42e5 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -107,7 +107,7 @@ impl File { /// /// let file = match File::open_mode(&p, Open, ReadWrite) { /// Ok(f) => f, - /// Err(e) => panic!("file error: {:?}", e), + /// Err(e) => panic!("file error: {}", e), /// }; /// // do some stuff with that file /// @@ -156,7 +156,7 @@ impl File { }) } }).update_err("couldn't open path as file", |e| { - format!("{:?}; path={:?}; mode={}; access={}", e, path.display(), + format!("{}; path={:?}; mode={}; access={}", e, path.display(), mode_string(mode), access_string(access)) }) } @@ -211,7 +211,7 @@ impl File { pub fn fsync(&mut self) -> IoResult<()> { self.fd.fsync() .update_err("couldn't fsync file", - |e| format!("{:?}; path={:?}", e, self.path.display())) + |e| format!("{}; path={:?}", e, self.path.display())) } /// This function is similar to `fsync`, except that it may not synchronize @@ -221,7 +221,7 @@ impl File { pub fn datasync(&mut self) -> IoResult<()> { self.fd.datasync() .update_err("couldn't datasync file", - |e| format!("{:?}; path={:?}", e, self.path.display())) + |e| format!("{}; path={:?}", e, self.path.display())) } /// Either truncates or extends the underlying file, updating the size of @@ -235,7 +235,7 @@ impl File { pub fn truncate(&mut self, size: i64) -> IoResult<()> { self.fd.truncate(size) .update_err("couldn't truncate file", |e| - format!("{:?}; path={:?}; size={:?}", e, self.path.display(), size)) + format!("{}; path={:?}; size={:?}", e, self.path.display(), size)) } /// Returns true if the stream has reached the end of the file. @@ -255,7 +255,7 @@ impl File { pub fn stat(&self) -> IoResult<FileStat> { self.fd.fstat() .update_err("couldn't fstat file", |e| - format!("{:?}; path={:?}", e, self.path.display())) + format!("{}; path={:?}", e, self.path.display())) } } @@ -283,7 +283,7 @@ impl File { pub fn unlink(path: &Path) -> IoResult<()> { fs_imp::unlink(path) .update_err("couldn't unlink path", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } /// Given a path, query the file system to get information about a file, @@ -310,7 +310,7 @@ pub fn unlink(path: &Path) -> IoResult<()> { pub fn stat(path: &Path) -> IoResult<FileStat> { fs_imp::stat(path) .update_err("couldn't stat path", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } /// Perform the same operation as the `stat` function, except that this @@ -324,7 +324,7 @@ pub fn stat(path: &Path) -> IoResult<FileStat> { pub fn lstat(path: &Path) -> IoResult<FileStat> { fs_imp::lstat(path) .update_err("couldn't lstat path", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } /// Rename a file or directory to a new name. @@ -346,7 +346,7 @@ pub fn lstat(path: &Path) -> IoResult<FileStat> { pub fn rename(from: &Path, to: &Path) -> IoResult<()> { fs_imp::rename(from, to) .update_err("couldn't rename path", |e| - format!("{:?}; from={:?}; to={:?}", e, from.display(), to.display())) + format!("{}; from={:?}; to={:?}", e, from.display(), to.display())) } /// Copies the contents of one file to another. This function will also @@ -380,7 +380,7 @@ pub fn rename(from: &Path, to: &Path) -> IoResult<()> { pub fn copy(from: &Path, to: &Path) -> IoResult<()> { fn update_err<T>(result: IoResult<T>, from: &Path, to: &Path) -> IoResult<T> { result.update_err("couldn't copy path", |e| { - format!("{:?}; from={:?}; to={:?}", e, from.display(), to.display()) + format!("{}; from={:?}; to={:?}", e, from.display(), to.display()) }) } @@ -424,14 +424,14 @@ pub fn copy(from: &Path, to: &Path) -> IoResult<()> { pub fn chmod(path: &Path, mode: io::FilePermission) -> IoResult<()> { fs_imp::chmod(path, mode.bits() as uint) .update_err("couldn't chmod path", |e| - format!("{:?}; path={:?}; mode={:?}", e, path.display(), mode)) + format!("{}; path={:?}; mode={:?}", e, path.display(), mode)) } /// Change the user and group owners of a file at the specified path. pub fn chown(path: &Path, uid: int, gid: int) -> IoResult<()> { fs_imp::chown(path, uid, gid) .update_err("couldn't chown path", |e| - format!("{:?}; path={:?}; uid={:?}; gid={:?}", e, path.display(), uid, gid)) + format!("{}; path={:?}; uid={}; gid={}", e, path.display(), uid, gid)) } /// Creates a new hard link on the filesystem. The `dst` path will be a @@ -440,7 +440,7 @@ pub fn chown(path: &Path, uid: int, gid: int) -> IoResult<()> { pub fn link(src: &Path, dst: &Path) -> IoResult<()> { fs_imp::link(src, dst) .update_err("couldn't link path", |e| - format!("{:?}; src={:?}; dest={:?}", e, src.display(), dst.display())) + format!("{}; src={:?}; dest={:?}", e, src.display(), dst.display())) } /// Creates a new symbolic link on the filesystem. The `dst` path will be a @@ -448,7 +448,7 @@ pub fn link(src: &Path, dst: &Path) -> IoResult<()> { pub fn symlink(src: &Path, dst: &Path) -> IoResult<()> { fs_imp::symlink(src, dst) .update_err("couldn't symlink path", |e| - format!("{:?}; src={:?}; dest={:?}", e, src.display(), dst.display())) + format!("{}; src={:?}; dest={:?}", e, src.display(), dst.display())) } /// Reads a symlink, returning the file that the symlink points to. @@ -460,7 +460,7 @@ pub fn symlink(src: &Path, dst: &Path) -> IoResult<()> { pub fn readlink(path: &Path) -> IoResult<Path> { fs_imp::readlink(path) .update_err("couldn't resolve symlink for path", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } /// Create a new, empty directory at the provided path @@ -483,7 +483,7 @@ pub fn readlink(path: &Path) -> IoResult<Path> { pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> { fs_imp::mkdir(path, mode.bits() as uint) .update_err("couldn't create directory", |e| - format!("{:?}; path={:?}; mode={:?}", e, path.display(), mode)) + format!("{}; path={:?}; mode={:?}", e, path.display(), mode)) } /// Remove an existing, empty directory @@ -505,7 +505,7 @@ pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> { pub fn rmdir(path: &Path) -> IoResult<()> { fs_imp::rmdir(path) .update_err("couldn't remove directory", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } /// Retrieve a vector containing all entries within a provided directory @@ -545,7 +545,7 @@ pub fn rmdir(path: &Path) -> IoResult<()> { pub fn readdir(path: &Path) -> IoResult<Vec<Path>> { fs_imp::readdir(path) .update_err("couldn't read directory", - |e| format!("{:?}; path={:?}", e, path.display())) + |e| format!("{}; path={:?}", e, path.display())) } /// Returns an iterator that will recursively walk the directory structure @@ -555,7 +555,7 @@ pub fn readdir(path: &Path) -> IoResult<Vec<Path>> { pub fn walk_dir(path: &Path) -> IoResult<Directories> { Ok(Directories { stack: try!(readdir(path).update_err("couldn't walk directory", - |e| format!("{:?}; path={:?}", e, path.display()))) + |e| format!("{}; path={:?}", e, path.display()))) }) } @@ -605,7 +605,7 @@ pub fn mkdir_recursive(path: &Path, mode: FilePermission) -> IoResult<()> { let result = mkdir(&curpath, mode) .update_err("couldn't recursively mkdir", - |e| format!("{:?}; path={:?}", e, path.display())); + |e| format!("{}; path={:?}", e, path.display())); match result { Err(mkdir_err) => { @@ -632,7 +632,7 @@ pub fn rmdir_recursive(path: &Path) -> IoResult<()> { rm_stack.push(path.clone()); fn rmdir_failed(err: &IoError, path: &Path) -> String { - format!("rmdir_recursive failed; path={:?}; cause={:?}", + format!("rmdir_recursive failed; path={:?}; cause={}", path.display(), err) } @@ -692,14 +692,14 @@ pub fn rmdir_recursive(path: &Path) -> IoResult<()> { pub fn change_file_times(path: &Path, atime: u64, mtime: u64) -> IoResult<()> { fs_imp::utime(path, atime, mtime) .update_err("couldn't change_file_times", |e| - format!("{:?}; path={:?}", e, path.display())) + format!("{}; path={:?}", e, path.display())) } impl Reader for File { fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { fn update_err<T>(result: IoResult<T>, file: &File) -> IoResult<T> { result.update_err("couldn't read file", - |e| format!("{:?}; path={:?}", + |e| format!("{}; path={:?}", e, file.path.display())) } @@ -722,7 +722,7 @@ impl Writer for File { fn write(&mut self, buf: &[u8]) -> IoResult<()> { self.fd.write(buf) .update_err("couldn't write to file", - |e| format!("{:?}; path={:?}", e, self.path.display())) + |e| format!("{}; path={:?}", e, self.path.display())) } } @@ -730,7 +730,7 @@ impl Seek for File { fn tell(&self) -> IoResult<u64> { self.fd.tell() .update_err("couldn't retrieve file cursor (`tell`)", - |e| format!("{:?}; path={:?}", e, self.path.display())) + |e| format!("{}; path={:?}", e, self.path.display())) } fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> { @@ -743,7 +743,7 @@ impl Seek for File { Err(e) => Err(e), }; err.update_err("couldn't seek in file", - |e| format!("{:?}; path={:?}", e, self.path.display())) + |e| format!("{}; path={:?}", e, self.path.display())) } } @@ -840,7 +840,7 @@ mod test { match $e { Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s), Err(ref err) => assert!(err.to_string().contains($s.as_slice()), - format!("`{:?}` did not contain `{:?}`", err, $s)) + format!("`{}` did not contain `{}`", err, $s)) } ) } diff --git a/src/libstd/io/net/tcp.rs b/src/libstd/io/net/tcp.rs index b1762ff26fc..7a376b50cd7 100644 --- a/src/libstd/io/net/tcp.rs +++ b/src/libstd/io/net/tcp.rs @@ -662,7 +662,7 @@ mod test { Ok(..) => panic!(), Err(ref e) => { assert!(e.kind == NotConnected || e.kind == EndOfFile, - "unknown kind: {}", e.kind); + "unknown kind: {:?}", e.kind); } } } @@ -686,7 +686,7 @@ mod test { Ok(..) => panic!(), Err(ref e) => { assert!(e.kind == NotConnected || e.kind == EndOfFile, - "unknown kind: {}", e.kind); + "unknown kind: {:?}", e.kind); } } } @@ -999,7 +999,7 @@ mod test { Ok(..) => panic!(), Err(e) => { assert!(e.kind == ConnectionRefused || e.kind == OtherIoError, - "unknown error: {} {}", e, e.kind); + "unknown error: {} {:?}", e, e.kind); } } } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 32b28c0c2c9..eef5bdb60ee 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -105,7 +105,7 @@ #![allow(unknown_features)] #![feature(linkage, thread_local, asm)] -#![feature(phase, lang_items, unsafe_destructor)] +#![feature(lang_items, unsafe_destructor)] #![feature(slicing_syntax, unboxed_closures)] #![feature(old_impl_check)] #![cfg_attr(stage0, allow(unused_attributes))] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 43f86033da0..befdc156094 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -371,7 +371,7 @@ pub mod builtin { /// /// ``` #[macro_export] - macro_rules! format_args { ($fmt:expr $($args:tt)*) => ({ + macro_rules! format_args { ($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ }) } @@ -407,7 +407,7 @@ pub mod builtin { /// /// ```rust /// let key: Option<&'static str> = option_env!("SECRET_KEY"); - /// println!("the secret key might be: {}", key); + /// println!("the secret key might be: {:?}", key); /// ``` #[macro_export] macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index b0bd6af57df..cef85c260a7 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1622,7 +1622,7 @@ mod tests { os::MapOption::MapWritable ]) { Ok(chunk) => chunk, - Err(msg) => panic!("{}", msg) + Err(msg) => panic!("{:?}", msg) }; assert!(chunk.len >= 16); diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 805f45c61c1..0b7dc19fcab 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -1150,7 +1150,7 @@ mod tests { let comps = path.components().collect::<Vec<&[u8]>>(); let exp: &[&str] = &$exp; let exps = exp.iter().map(|x| x.as_bytes()).collect::<Vec<&[u8]>>(); - assert_eq!(comps, exprs); + assert_eq!(comps, exps); let comps = path.components().rev().collect::<Vec<&[u8]>>(); let exps = exps.into_iter().rev().collect::<Vec<&[u8]>>(); assert_eq!(comps, exps); diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index bd4b0407bf5..5c4e7aa9ac2 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -1740,8 +1740,8 @@ mod tests { let path = Path::new(pstr); let arg = $arg; let res = path.$op(arg); - let exp = $res; - assert_eq!(Path::new($path).$op($arg), $res); + let exp = Path::new($res); + assert_eq!(res, exp); } ) } @@ -1920,8 +1920,7 @@ mod tests { { let path = Path::new($path); let (abs, vol, cwd, rel) = ($abs, $vol, $cwd, $rel); - let b = path.is_absolute(); - assert_eq!(path.is_absolute(), asb); + assert_eq!(path.is_absolute(), abs); assert_eq!(is_vol_relative(&path), vol); assert_eq!(is_cwd_relative(&path), cwd); assert_eq!(path.is_relative(), rel); @@ -1955,7 +1954,7 @@ mod tests { let dest = Path::new($dest); let exp = $exp; let res = path.is_ancestor_of(&dest); - assert_eq!(Path::new($path).is_ancestor_of(Path::new($dest)), $exp); + assert_eq!(res, exp); } ) } @@ -2084,7 +2083,7 @@ mod tests { macro_rules! t { (s: $path:expr, $other:expr, $exp:expr) => ( { - assert_eq!(Path::new($path).path_relative_from(Path::new($other)) + assert_eq!(Path::new($path).path_relative_from(&Path::new($other)) .as_ref().and_then(|x| x.as_str()), $exp); } ) diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index fc257b12bb6..d3e6cd166ec 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -71,7 +71,7 @@ //! use std::rand; //! //! let tuple = rand::random::<(f64, char)>(); -//! println!("{}", tuple) +//! println!("{:?}", tuple) //! ``` //! //! ## Monte Carlo estimation of π diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index f24a329a390..eca7d3155b1 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -481,7 +481,7 @@ impl<T> UnsafeFlavor<T> for Receiver<T> { /// // Do some useful work for awhile /// /// // Let's see what that answer was -/// println!("{}", rx.recv().unwrap()); +/// println!("{:?}", rx.recv().unwrap()); /// ``` #[stable] pub fn channel<T: Send>() -> (Sender<T>, Receiver<T>) { diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index dea5d71080a..37ed32fa367 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -196,7 +196,7 @@ pub mod compat { /// they are used to be passed to the real function if available. macro_rules! compat_fn { ($module:ident::$symbol:ident($($argname:ident: $argtype:ty),*) - -> $rettype:ty $fallback:block) => ( + -> $rettype:ty { $fallback:expr }) => ( #[inline(always)] pub unsafe fn $symbol($($argname: $argtype),*) -> $rettype { static mut ptr: extern "system" fn($($argname: $argtype),*) -> $rettype = thunk; @@ -211,14 +211,11 @@ pub mod compat { } } - extern "system" fn fallback($($argname: $argtype),*) -> $rettype $fallback + extern "system" fn fallback($($argname: $argtype),*) + -> $rettype { $fallback } ::intrinsics::atomic_load_relaxed(&ptr)($($argname),*) } - ); - - ($module:ident::$symbol:ident($($argname:ident: $argtype:ty),*) $fallback:block) => ( - compat_fn!($module::$symbol($($argname: $argtype),*) -> () $fallback) ) } @@ -236,20 +233,22 @@ pub mod compat { fn SetLastError(dwErrCode: DWORD); } - compat_fn! { kernel32::CreateSymbolicLinkW(_lpSymlinkFileName: LPCWSTR, - _lpTargetFileName: LPCWSTR, - _dwFlags: DWORD) -> BOOLEAN { - unsafe { SetLastError(ERROR_CALL_NOT_IMPLEMENTED as DWORD); } - 0 - } } - - compat_fn! { kernel32::GetFinalPathNameByHandleW(_hFile: HANDLE, - _lpszFilePath: LPCWSTR, - _cchFilePath: DWORD, - _dwFlags: DWORD) -> DWORD { - unsafe { SetLastError(ERROR_CALL_NOT_IMPLEMENTED as DWORD); } - 0 - } } + compat_fn! { + kernel32::CreateSymbolicLinkW(_lpSymlinkFileName: LPCWSTR, + _lpTargetFileName: LPCWSTR, + _dwFlags: DWORD) -> BOOLEAN { + unsafe { SetLastError(ERROR_CALL_NOT_IMPLEMENTED as DWORD); 0 } + } + } + + compat_fn! { + kernel32::GetFinalPathNameByHandleW(_hFile: HANDLE, + _lpszFilePath: LPCWSTR, + _cchFilePath: DWORD, + _dwFlags: DWORD) -> DWORD { + unsafe { SetLastError(ERROR_CALL_NOT_IMPLEMENTED as DWORD); 0 } + } + } } } diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index 4498f56c00a..30707488b30 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -62,7 +62,7 @@ pub unsafe fn create(stack: uint, p: Thunk) -> rust_thread { if ret as uint == 0 { // be sure to not leak the closure let _p: Box<Thunk> = mem::transmute(arg); - panic!("failed to spawn native thread: {}", ret); + panic!("failed to spawn native thread: {:?}", ret); } return ret; } |
