Skip to content

Commit e18c6bb

Browse files
committed
Make moves explicit in aux test files
1 parent d52f988 commit e18c6bb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/test/auxiliary/cci_class_6.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn cat<U>(in_x : uint, in_y : int, -in_info: ~[U]) -> cat<U> {
2121
cat {
2222
meows: in_x,
2323
how_hungry: in_y,
24-
info: in_info
24+
info: move in_info
2525
}
2626
}
2727

src/test/auxiliary/test_comm.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
use libc::size_t;
99

10-
export port::{};
1110
export port;
1211
export recv;
1312

@@ -65,21 +64,21 @@ fn recv<T: Send>(p: port<T>) -> T { recv_((**p).po) }
6564

6665
/// Receive on a raw port pointer
6766
fn recv_<T: Send>(p: *rust_port) -> T {
68-
let yield = 0u;
67+
let yield = 0;
6968
let yieldp = ptr::addr_of(&yield);
7069
let mut res;
7170
res = rusti::init::<T>();
7271
rustrt::port_recv(ptr::addr_of(&res) as *uint, p, yieldp);
7372

74-
if yield != 0u {
73+
if yield != 0 {
7574
// Data isn't available yet, so res has not been initialized.
7675
task::yield();
7776
} else {
7877
// In the absense of compiler-generated preemption points
7978
// this is a good place to yield
8079
task::yield();
8180
}
82-
return res;
81+
move res
8382
}
8483

8584

0 commit comments

Comments
 (0)