Skip to content

Commit 8cf9929

Browse files
committed
Rebase test fixes v2
1 parent 4459b1d commit 8cf9929

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

src/test/compile-fail/issue-19883.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,17 @@ trait From<Src> {
1818

1919
trait To {
2020
// This is a typo, the return type should be `<Dst as From<Self>>::Output`
21-
fn to<Dst: From<Self>>(self) -> <Dst as From<Self>>::Dst {
22-
//~^ error: the trait `core::kinds::Sized` is not implemented
23-
From::from(self)
21+
fn to<Dst: From<Self>>(
22+
self
23+
//~^ error: the trait `core::kinds::Sized` is not implemented
24+
) ->
25+
<Dst as From<Self>>::Dst
26+
//~^ error: the trait `core::kinds::Sized` is not implemented
27+
{
28+
From::from(
29+
//~^ error: the trait `core::kinds::Sized` is not implemented
30+
self
31+
)
2432
}
2533
}
2634

src/test/compile-fail/issue-20005.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ trait From<Src> {
1717
}
1818

1919
trait To {
20-
fn to<Dst>(self) -> <Dst as From<Self>>::Result where Dst: From<Self> {
21-
From::from(self) //~error: type annotations required
20+
fn to<Dst>(
21+
self //~ error: the trait `core::kinds::Sized` is not implemented
22+
) -> <Dst as From<Self>>::Result where Dst: From<Self> {
23+
From::from( //~ error: the trait `core::kinds::Sized` is not implemented
24+
self
25+
)
2226
}
2327
}
2428

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
extern crate log;
1818
extern crate libc;
1919

20-
use std::comm::channel;
20+
use std::sync::mpsc::channel;
2121
use std::io::net::tcp::{TcpListener, TcpStream};
2222
use std::io::{Acceptor, Listener};
2323
use std::thread::{Builder, Thread};
@@ -35,7 +35,7 @@ fn main() {
3535
let (tx, rx) = channel();
3636
Thread::spawn(move || -> () {
3737
let mut listener = TcpListener::bind("127.0.0.1:0").unwrap();
38-
tx.send(listener.socket_name().unwrap());
38+
tx.send(listener.socket_name().unwrap()).unwrap();
3939
let mut acceptor = listener.listen();
4040
loop {
4141
let mut stream = match acceptor.accept() {
@@ -49,7 +49,7 @@ fn main() {
4949
stream.write(&[2]);
5050
}
5151
}).detach();
52-
let addr = rx.recv();
52+
let addr = rx.recv().unwarp();
5353

5454
let (tx, rx) = channel();
5555
for _ in range(0u, 1000) {
@@ -64,15 +64,15 @@ fn main() {
6464
},
6565
Err(e) => debug!("{}", e)
6666
}
67-
tx.send(());
67+
tx.send(()).unwrap();
6868
}).detach();
6969
}
7070

7171
// Wait for all clients to exit, but don't wait for the server to exit. The
7272
// server just runs infinitely.
7373
drop(tx);
7474
for _ in range(0u, 1000) {
75-
rx.recv();
75+
rx.recv().unwrap();
7676
}
7777
unsafe { libc::exit(0) }
7878
}

0 commit comments

Comments
 (0)