Skip to content

Commit 958df4b

Browse files
committed
De-mode comm, libc, priv, rt, sync, arc. Super easy.
1 parent 4377802 commit 958df4b

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

src/libcore/comm.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
14
/*!
25
* Communication between tasks
36
*
@@ -162,7 +165,7 @@ fn chan<T: send>(p: port<T>) -> chan<T> {
162165
* Sends data over a channel. The sent data is moved into the channel,
163166
* whereupon the caller loses access to it.
164167
*/
165-
fn send<T: send>(ch: chan<T>, -data: T) {
168+
fn send<T: send>(ch: chan<T>, +data: T) {
166169
let chan_t(p) = ch;
167170
let data_ptr = ptr::addr_of(data) as *();
168171
let res = rustrt::rust_port_id_send(p, data_ptr);

src/libcore/libc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
14
/*!
25
* Bindings for libc.
36
*

src/libcore/priv.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
4+
15
#[doc(hidden)];
26

37
export chan_from_global_ptr, weaken_task;

src/libcore/rt.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
14
//! Runtime calls emitted by the compiler.
25
36
import libc::c_char;

src/libstd/arc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
14
/**
25
* Concurrency-enabled mechanisms for sharing mutable and/or immutable state
36
* between tasks.

src/libstd/sync.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
14
/**
25
* The concurrency primitives you know and love.
36
*
@@ -836,7 +839,7 @@ mod tests {
836839
}
837840
}
838841
#[cfg(test)]
839-
fn test_rwlock_exclusion(x: ~rwlock, mode1: rwlock_mode,
842+
fn test_rwlock_exclusion(+x: ~rwlock, mode1: rwlock_mode,
840843
mode2: rwlock_mode) {
841844
// Test mutual exclusion between readers and writers. Just like the
842845
// mutex mutual exclusion test, a ways above.
@@ -881,7 +884,7 @@ mod tests {
881884
test_rwlock_exclusion(~rwlock(), downgrade, downgrade);
882885
}
883886
#[cfg(test)]
884-
fn test_rwlock_handshake(x: ~rwlock, mode1: rwlock_mode,
887+
fn test_rwlock_handshake(+x: ~rwlock, mode1: rwlock_mode,
885888
mode2: rwlock_mode, make_mode2_go_first: bool) {
886889
// Much like sem_multi_resource.
887890
let x2 = ~x.clone();

0 commit comments

Comments
 (0)