Skip to content

Commit 8dff0ac

Browse files
committed
Test fixes and rebase conflicts
1 parent 6ebb6e6 commit 8dff0ac

File tree

9 files changed

+20
-12
lines changed

9 files changed

+20
-12
lines changed

src/librustc/middle/ty.rs

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ use std::fmt;
7474
use std::hash::{Hash, SipHasher, Hasher};
7575
use std::mem;
7676
use std::num::ToPrimitive;
77-
use std::num::wrapping::WrappingOps;
7877
use std::ops;
7978
use std::rc::Rc;
8079
use std::vec::IntoIter;

src/libstd/old_io/extensions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ mod bench {
519519
({
520520
use super::u64_from_be_bytes;
521521

522-
let len = $stride.wrapping_mul(100).wrapping_add($start_index);
522+
let len = ($stride as u8).wrapping_mul(100).wrapping_add($start_index);
523523
let data = (0..len).collect::<Vec<_>>();
524524
let mut sum = 0;
525525
$b.iter(|| {

src/libstd/sys/windows/fs.rs

+7
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ impl FileDesc {
135135
_ => Err(super::last_error()),
136136
}
137137
}
138+
139+
#[allow(dead_code)]
140+
pub fn unwrap(self) -> fd_t {
141+
let fd = self.fd;
142+
unsafe { mem::forget(self) };
143+
fd
144+
}
138145
}
139146

140147
impl Drop for FileDesc {

src/libstd/sys/windows/process.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ mod tests {
487487
#[test]
488488
fn test_make_command_line() {
489489
fn test_wrapper(prog: &str, args: &[&str]) -> String {
490-
make_command_line(&CString::new(prog),
490+
make_command_line(&CString::new(prog).unwrap(),
491491
&args.iter()
492-
.map(|a| CString::new(a))
492+
.map(|a| CString::new(*a).unwrap())
493493
.collect::<Vec<CString>>())
494494
}
495495

src/libstd/sys/windows/process2.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,9 @@ mod tests {
445445
fn test_wrapper(prog: &str, args: &[&str]) -> String {
446446
String::from_utf16(
447447
&make_command_line(OsStr::from_str(prog),
448-
args.iter()
449-
.map(|a| OsString::from_str(a))
450-
.collect::<Vec<OsString>>()
451-
.as_slice())).unwrap()
448+
&args.iter()
449+
.map(|a| OsString::from(a))
450+
.collect::<Vec<OsString>>())).unwrap()
452451
}
453452

454453
assert_eq!(

src/test/run-pass-fulldeps/create-dir-all-bare.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-android
12+
1113
#![feature(rustc_private)]
1214

1315
extern crate rustc_back;

src/test/run-pass-fulldeps/rename-directory.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// This test can't be a unit test in std,
1212
// because it needs TempDir, which is in extra
1313

14+
// ignore-android
1415
// pretty-expanded FIXME #23616
1516

1617
#![feature(rustc_private, path_ext)]

src/test/run-pass/big-literals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ pub fn main() {
2121
assert_eq!(0xffffffffffffffff, (-1 as u64));
2222
assert_eq!(18446744073709551615, (-1 as u64));
2323

24-
assert_eq!((-2147483648).wrapping_sub(1), 2147483647);
24+
assert_eq!((-2147483648i32).wrapping_sub(1), 2147483647);
2525
}

src/test/run-pass/tcp-stress.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ extern crate libc;
2323
use std::sync::mpsc::channel;
2424
use std::old_io::net::tcp::{TcpListener, TcpStream};
2525
use std::old_io::{Acceptor, Listener, Reader, Writer};
26-
use std::thread::{Builder, Thread};
26+
use std::thread::{self, Builder};
2727
use std::time::Duration;
2828

2929
fn main() {
3030
// This test has a chance to time out, try to not let it time out
31-
Thread::spawn(move|| -> () {
31+
thread::spawn(move|| -> () {
3232
use std::old_io::timer;
3333
timer::sleep(Duration::milliseconds(30 * 1000));
3434
println!("timed out!");
3535
unsafe { libc::exit(1) }
3636
});
3737

3838
let (tx, rx) = channel();
39-
Thread::spawn(move || -> () {
39+
thread::spawn(move || -> () {
4040
let mut listener = TcpListener::bind("127.0.0.1:0").unwrap();
4141
tx.send(listener.socket_name().unwrap()).unwrap();
4242
let mut acceptor = listener.listen();

0 commit comments

Comments
 (0)