Skip to content

Commit 4febc42

Browse files
committed
---
yaml --- r: 22326 b: refs/heads/snap-stage3 c: 8fc60af h: refs/heads/master v: v3
1 parent 82a93ac commit 4febc42

36 files changed

+147
-152
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f5dfd9b3ce5dd6fbe567ba07e89c70a4db2c4cd4
4+
refs/heads/snap-stage3: 8fc60af441a1375ee73a0efe4524b54ff039e69a
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/future.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn from_port<A:Send>(port: future_pipe::client::waiting<A>) ->
8787
}
8888
}
8989

90-
pub fn from_fn<A>(+f: ~fn() -> A) -> Future<A> {
90+
pub fn from_fn<A>(f: ~fn() -> A) -> Future<A> {
9191
/*!
9292
* Create a future from a function.
9393
*
@@ -99,7 +99,7 @@ pub fn from_fn<A>(+f: ~fn() -> A) -> Future<A> {
9999
Future {state: Pending(move f)}
100100
}
101101

102-
pub fn spawn<A:Send>(+blk: fn~() -> A) -> Future<A> {
102+
pub fn spawn<A:Send>(blk: fn~() -> A) -> Future<A> {
103103
/*!
104104
* Create a future from a unique closure.
105105
*

branches/snap-stage3/src/libcore/pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ endpoint is passed to the new task.
860860
pub fn spawn_service<T: Send, Tb: Send>(
861861
init: extern fn() -> (SendPacketBuffered<T, Tb>,
862862
RecvPacketBuffered<T, Tb>),
863-
+service: fn~(v: RecvPacketBuffered<T, Tb>))
863+
service: fn~(v: RecvPacketBuffered<T, Tb>))
864864
-> SendPacketBuffered<T, Tb>
865865
{
866866
let (client, server) = init();
@@ -884,7 +884,7 @@ receive state.
884884
pub fn spawn_service_recv<T: Send, Tb: Send>(
885885
init: extern fn() -> (RecvPacketBuffered<T, Tb>,
886886
SendPacketBuffered<T, Tb>),
887-
+service: fn~(v: SendPacketBuffered<T, Tb>))
887+
service: fn~(v: SendPacketBuffered<T, Tb>))
888888
-> RecvPacketBuffered<T, Tb>
889889
{
890890
let (client, server) = init();

branches/snap-stage3/src/libcore/private.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type GlobalPtr = *libc::uintptr_t;
4646
pub unsafe fn chan_from_global_ptr<T: Send>(
4747
global: GlobalPtr,
4848
task_fn: fn() -> task::TaskBuilder,
49-
+f: fn~(comm::Port<T>)
49+
f: fn~(comm::Port<T>)
5050
) -> comm::Chan<T> {
5151

5252
enum Msg {

branches/snap-stage3/src/libcore/task.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub type TaskOpts = {
220220
// FIXME (#2585): Replace the 'consumed' bit with move mode on self
221221
pub enum TaskBuilder = {
222222
opts: TaskOpts,
223-
gen_body: fn@(+v: fn~()) -> fn~(),
223+
gen_body: fn@(v: fn~()) -> fn~(),
224224
can_not_copy: Option<util::NonCopyable>,
225225
mut consumed: bool,
226226
};
@@ -233,7 +233,7 @@ pub enum TaskBuilder = {
233233
pub fn task() -> TaskBuilder {
234234
TaskBuilder({
235235
opts: default_task_opts(),
236-
gen_body: |+body| move body, // Identity function
236+
gen_body: |body| move body, // Identity function
237237
can_not_copy: None,
238238
mut consumed: false,
239239
})
@@ -410,7 +410,7 @@ impl TaskBuilder {
410410
* generator by applying the task body which results from the
411411
* existing body generator to the new body generator.
412412
*/
413-
fn add_wrapper(wrapper: fn@(+v: fn~()) -> fn~()) -> TaskBuilder {
413+
fn add_wrapper(wrapper: fn@(v: fn~()) -> fn~()) -> TaskBuilder {
414414
let prev_gen_body = self.gen_body;
415415
let notify_chan = if self.opts.notify_chan.is_none() {
416416
None
@@ -442,7 +442,7 @@ impl TaskBuilder {
442442
* When spawning into a new scheduler, the number of threads requested
443443
* must be greater than zero.
444444
*/
445-
fn spawn(+f: fn~()) {
445+
fn spawn(f: fn~()) {
446446
let notify_chan = if self.opts.notify_chan.is_none() {
447447
None
448448
} else {
@@ -460,7 +460,7 @@ impl TaskBuilder {
460460
spawn::spawn_raw(move opts, x.gen_body(move f));
461461
}
462462
/// Runs a task, while transfering ownership of one argument to the child.
463-
fn spawn_with<A: Send>(arg: A, +f: fn~(+v: A)) {
463+
fn spawn_with<A: Send>(arg: A, f: fn~(v: A)) {
464464
let arg = ~mut Some(move arg);
465465
do self.spawn |move arg, move f| {
466466
f(option::swap_unwrap(arg))
@@ -478,7 +478,7 @@ impl TaskBuilder {
478478
* otherwise be required to establish communication from the parent
479479
* to the child.
480480
*/
481-
fn spawn_listener<A: Send>(+f: fn~(comm::Port<A>)) -> comm::Chan<A> {
481+
fn spawn_listener<A: Send>(f: fn~(comm::Port<A>)) -> comm::Chan<A> {
482482
let setup_po = comm::Port();
483483
let setup_ch = comm::Chan(&setup_po);
484484
do self.spawn |move f| {
@@ -494,7 +494,7 @@ impl TaskBuilder {
494494
* Runs a new task, setting up communication in both directions
495495
*/
496496
fn spawn_conversation<A: Send, B: Send>
497-
(+f: fn~(comm::Port<A>, comm::Chan<B>))
497+
(f: fn~(comm::Port<A>, comm::Chan<B>))
498498
-> (comm::Port<B>, comm::Chan<A>) {
499499
let from_child = comm::Port();
500500
let to_parent = comm::Chan(&from_child);
@@ -517,7 +517,7 @@ impl TaskBuilder {
517517
* # Failure
518518
* Fails if a future_result was already set for this task.
519519
*/
520-
fn try<T: Send>(+f: fn~() -> T) -> Result<T,()> {
520+
fn try<T: Send>(f: fn~() -> T) -> Result<T,()> {
521521
let po = comm::Port();
522522
let ch = comm::Chan(&po);
523523
let mut result = None;
@@ -556,7 +556,7 @@ pub fn default_task_opts() -> TaskOpts {
556556
557557
/* Spawn convenience functions */
558558
559-
pub fn spawn(+f: fn~()) {
559+
pub fn spawn(f: fn~()) {
560560
/*!
561561
* Creates and executes a new child task
562562
*
@@ -569,7 +569,7 @@ pub fn spawn(+f: fn~()) {
569569
task().spawn(move f)
570570
}
571571
572-
pub fn spawn_unlinked(+f: fn~()) {
572+
pub fn spawn_unlinked(f: fn~()) {
573573
/*!
574574
* Creates a child task unlinked from the current one. If either this
575575
* task or the child task fails, the other will not be killed.
@@ -578,7 +578,7 @@ pub fn spawn_unlinked(+f: fn~()) {
578578
task().unlinked().spawn(move f)
579579
}
580580
581-
pub fn spawn_supervised(+f: fn~()) {
581+
pub fn spawn_supervised(f: fn~()) {
582582
/*!
583583
* Creates a child task unlinked from the current one. If either this
584584
* task or the child task fails, the other will not be killed.
@@ -587,7 +587,7 @@ pub fn spawn_supervised(+f: fn~()) {
587587
task().supervised().spawn(move f)
588588
}
589589
590-
pub fn spawn_with<A:Send>(+arg: A, +f: fn~(+v: A)) {
590+
pub fn spawn_with<A:Send>(arg: A, f: fn~(v: A)) {
591591
/*!
592592
* Runs a task, while transfering ownership of one argument to the
593593
* child.
@@ -601,7 +601,7 @@ pub fn spawn_with<A:Send>(+arg: A, +f: fn~(+v: A)) {
601601
task().spawn_with(move arg, move f)
602602
}
603603
604-
pub fn spawn_listener<A:Send>(+f: fn~(comm::Port<A>)) -> comm::Chan<A> {
604+
pub fn spawn_listener<A:Send>(f: fn~(comm::Port<A>)) -> comm::Chan<A> {
605605
/*!
606606
* Runs a new task while providing a channel from the parent to the child
607607
*
@@ -612,7 +612,7 @@ pub fn spawn_listener<A:Send>(+f: fn~(comm::Port<A>)) -> comm::Chan<A> {
612612
}
613613
614614
pub fn spawn_conversation<A: Send, B: Send>
615-
(+f: fn~(comm::Port<A>, comm::Chan<B>))
615+
(f: fn~(comm::Port<A>, comm::Chan<B>))
616616
-> (comm::Port<B>, comm::Chan<A>) {
617617
/*!
618618
* Runs a new task, setting up communication in both directions
@@ -623,7 +623,7 @@ pub fn spawn_conversation<A: Send, B: Send>
623623
task().spawn_conversation(move f)
624624
}
625625
626-
pub fn spawn_sched(mode: SchedMode, +f: fn~()) {
626+
pub fn spawn_sched(mode: SchedMode, f: fn~()) {
627627
/*!
628628
* Creates a new scheduler and executes a task on it
629629
*
@@ -640,7 +640,7 @@ pub fn spawn_sched(mode: SchedMode, +f: fn~()) {
640640
task().sched_mode(mode).spawn(move f)
641641
}
642642
643-
pub fn try<T:Send>(+f: fn~() -> T) -> Result<T,()> {
643+
pub fn try<T:Send>(f: fn~() -> T) -> Result<T,()> {
644644
/*!
645645
* Execute a function in another task and return either the return value
646646
* of the function or result::err.
@@ -1127,7 +1127,7 @@ fn test_spawn_sched_blocking() {
11271127
}
11281128

11291129
#[cfg(test)]
1130-
fn avoid_copying_the_body(spawnfn: fn(+v: fn~())) {
1130+
fn avoid_copying_the_body(spawnfn: fn(v: fn~())) {
11311131
let p = comm::Port::<uint>();
11321132
let ch = comm::Chan(&p);
11331133

@@ -1150,7 +1150,7 @@ fn test_avoid_copying_the_body_spawn() {
11501150

11511151
#[test]
11521152
fn test_avoid_copying_the_body_spawn_listener() {
1153-
do avoid_copying_the_body |+f| {
1153+
do avoid_copying_the_body |f| {
11541154
spawn_listener(fn~(move f, _po: comm::Port<int>) {
11551155
f();
11561156
});
@@ -1168,7 +1168,7 @@ fn test_avoid_copying_the_body_task_spawn() {
11681168

11691169
#[test]
11701170
fn test_avoid_copying_the_body_spawn_listener_1() {
1171-
do avoid_copying_the_body |+f| {
1171+
do avoid_copying_the_body |f| {
11721172
task().spawn_listener(fn~(move f, _po: comm::Port<int>) {
11731173
f();
11741174
});

branches/snap-stage3/src/libcore/task/spawn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
488488
}
489489
}
490490

491-
pub fn spawn_raw(opts: TaskOpts, +f: fn~()) {
491+
pub fn spawn_raw(opts: TaskOpts, f: fn~()) {
492492
let (child_tg, ancestors, is_main) =
493493
gen_child_taskgroup(opts.linked, opts.supervised);
494494

@@ -533,7 +533,7 @@ pub fn spawn_raw(opts: TaskOpts, +f: fn~()) {
533533
fn make_child_wrapper(child: *rust_task, child_arc: TaskGroupArc,
534534
ancestors: AncestorList, is_main: bool,
535535
notify_chan: Option<Chan<Notification>>,
536-
+f: fn~()) -> fn~() {
536+
f: fn~()) -> fn~() {
537537
let child_data = ~mut Some((move child_arc, move ancestors));
538538
return fn~(move notify_chan, move child_data, move f) {
539539
// Agh. Get move-mode items into the closure. FIXME (#2829)

branches/snap-stage3/src/libstd/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// NB: transitionary, de-mode-ing.
2-
// tjc: forbid deprecated modes again after snap
2+
#[forbid(deprecated_mode)];
33
/**
44
* Concurrency-enabled mechanisms for sharing mutable and/or immutable state
55
* between tasks.

branches/snap-stage3/src/libstd/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// tjc: forbid deprecated modes again after snap
1+
#[forbid(deprecated_mode)];
22

33
use vec::{to_mut, from_elem};
44

@@ -553,7 +553,7 @@ pure fn land(w0: uint, w1: uint) -> uint { return w0 & w1; }
553553
pure fn right(_w0: uint, w1: uint) -> uint { return w1; }
554554

555555
impl Bitv: ops::Index<uint,bool> {
556-
pure fn index(+i: uint) -> bool {
556+
pure fn index(i: uint) -> bool {
557557
self.get(i)
558558
}
559559
}

branches/snap-stage3/src/libstd/c_vec.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* great care must be taken to ensure that a reference to the c_vec::t is
2626
* still held if needed.
2727
*/
28+
#[forbid(deprecated_mode)];
2829

2930
/**
3031
* The type representing a foreign chunk of memory
@@ -111,7 +112,7 @@ pub fn get<T: Copy>(t: CVec<T>, ofs: uint) -> T {
111112
*
112113
* Fails if `ofs` is greater or equal to the length of the vector
113114
*/
114-
pub fn set<T: Copy>(t: CVec<T>, ofs: uint, +v: T) {
115+
pub fn set<T: Copy>(t: CVec<T>, ofs: uint, v: T) {
115116
assert ofs < len(t);
116117
unsafe { *ptr::mut_offset((*t).base, ofs) = v };
117118
}

branches/snap-stage3/src/libstd/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// tjc: forbid deprecated modes again after snap
1+
#[forbid(deprecated_mode)];
22
/// A dynamic, mutable location.
33
///
44
/// Similar to a mutable option type, but friendlier.

branches/snap-stage3/src/libstd/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ pub struct DuplexStream<T: Send, U: Send> {
1616
}
1717

1818
impl<T: Send, U: Send> DuplexStream<T, U> : Channel<T> {
19-
fn send(+x: T) {
19+
fn send(x: T) {
2020
self.chan.send(move x)
2121
}
2222

23-
fn try_send(+x: T) -> bool {
23+
fn try_send(x: T) -> bool {
2424
self.chan.try_send(move x)
2525
}
2626
}

branches/snap-stage3/src/libstd/dbg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// tjc: forbid deprecated modes again after snap
1+
#[forbid(deprecated_mode)];
22
//! Unsafe debugging functions for inspecting values.
33
44
use cast::reinterpret_cast;

branches/snap-stage3/src/libstd/deque.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! A deque. Untested as of yet. Likely buggy
2-
// tjc: forbid deprecated modes again after snap
2+
#[forbid(deprecated_mode)];
33
#[forbid(non_camel_case_types)];
44

55
use option::{Some, None};
@@ -200,7 +200,7 @@ mod tests {
200200
assert (deq.get(3) == d);
201201
}
202202

203-
fn test_parameterized<T: Copy Eq Owned>(a: T, +b: T, +c: T, +d: T) {
203+
fn test_parameterized<T: Copy Eq Owned>(a: T, b: T, c: T, d: T) {
204204
let deq: deque::Deque<T> = deque::create::<T>();
205205
assert (deq.size() == 0u);
206206
deq.add_front(a);

branches/snap-stage3/src/libstd/ebml.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[forbid(deprecated_mode)];
12
// Simple Extensible Binary Markup Language (ebml) reader and writer on a
23
// cursor model. See the specification here:
34
// http://www.matroska.org/technical/specs/rfc/index.html
@@ -17,7 +18,7 @@ pub type Doc = {data: @~[u8], start: uint, end: uint};
1718
type TaggedDoc = {tag: uint, doc: Doc};
1819

1920
impl Doc: ops::Index<uint,Doc> {
20-
pure fn index(+tag: uint) -> Doc {
21+
pure fn index(tag: uint) -> Doc {
2122
unsafe {
2223
get_doc(self, tag)
2324
}
@@ -563,11 +564,11 @@ impl EbmlDeserializer: serialization::Deserializer {
563564

564565
#[test]
565566
fn test_option_int() {
566-
fn serialize_1<S: serialization::Serializer>(&&s: S, v: int) {
567+
fn serialize_1<S: serialization::Serializer>(s: &S, v: int) {
567568
s.emit_i64(v as i64);
568569
}
569570

570-
fn serialize_0<S: serialization::Serializer>(&&s: S, v: Option<int>) {
571+
fn serialize_0<S: serialization::Serializer>(s: &S, v: Option<int>) {
571572
do s.emit_enum(~"core::option::t") {
572573
match v {
573574
None => s.emit_enum_variant(
@@ -581,11 +582,11 @@ fn test_option_int() {
581582
}
582583
}
583584

584-
fn deserialize_1<S: serialization::Deserializer>(&&s: S) -> int {
585+
fn deserialize_1<S: serialization::Deserializer>(s: &S) -> int {
585586
s.read_i64() as int
586587
}
587588

588-
fn deserialize_0<S: serialization::Deserializer>(&&s: S) -> Option<int> {
589+
fn deserialize_0<S: serialization::Deserializer>(s: &S) -> Option<int> {
589590
do s.read_enum(~"core::option::t") {
590591
do s.read_enum_variant |i| {
591592
match i {
@@ -608,11 +609,11 @@ fn test_option_int() {
608609
debug!("v == %?", v);
609610
let bytes = do io::with_bytes_writer |wr| {
610611
let ebml_w = ebml::Writer(wr);
611-
serialize_0(ebml_w, v);
612+
serialize_0(&ebml_w, v);
612613
};
613614
let ebml_doc = ebml::Doc(@bytes);
614615
let deser = ebml_deserializer(ebml_doc);
615-
let v1 = deserialize_0(deser);
616+
let v1 = deserialize_0(&deser);
616617
debug!("v1 == %?", v1);
617618
assert v == v1;
618619
}

branches/snap-stage3/src/libstd/ebml2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[forbid(deprecated_mode)];
12
use serialization2;
23

34
// Simple Extensible Binary Markup Language (ebml) reader and writer on a
@@ -31,7 +32,7 @@ struct TaggedDoc {
3132
}
3233

3334
impl Doc: ops::Index<uint,Doc> {
34-
pure fn index(+tag: uint) -> Doc {
35+
pure fn index(tag: uint) -> Doc {
3536
unsafe {
3637
get_doc(self, tag)
3738
}

0 commit comments

Comments
 (0)