Skip to content

Commit b63ad41

Browse files
committed
---
yaml --- r: 22443 b: refs/heads/master c: f3e8746 h: refs/heads/master i: 22441: 970b2b3 22439: bdddf57 v: v3
1 parent 243b30c commit b63ad41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1300
-392
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 62e9ae04e26f60124f6760df26b517bce450ae41
2+
refs/heads/master: f3e874635fa4acb021947d482a7c3a32090e5910
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,11 +2320,11 @@ and one for values. This means that this code is valid:
23202320
~~~~
23212321
mod buffalo {
23222322
type buffalo = int;
2323-
fn buffalo(buffalo: buffalo) -> buffalo { buffalo }
2323+
fn buffalo<buffalo: copy>(buffalo: buffalo) -> buffalo { buffalo }
23242324
}
23252325
fn main() {
23262326
let buffalo: buffalo::buffalo = 1;
2327-
buffalo::buffalo(buffalo::buffalo(buffalo));
2327+
buffalo::buffalo::<buffalo::buffalo>(buffalo::buffalo(buffalo));
23282328
}
23292329
~~~~
23302330

trunk/mk/target.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# (resp. corelib), set this flag to 1. It will cause stage1 to use
99
# the snapshot runtime (resp. corelib) rather than the runtime
1010
# (resp. corelib) from the working directory.
11-
USE_SNAPSHOT_RUNTIME=1
12-
USE_SNAPSHOT_CORELIB=1
13-
USE_SNAPSHOT_STDLIB=1
11+
USE_SNAPSHOT_RUNTIME=0
12+
USE_SNAPSHOT_CORELIB=0
13+
USE_SNAPSHOT_STDLIB=0
1414

1515
define TARGET_STAGE_N
1616

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ syn keyword rustConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO
6666
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
6767
syn match rustModPathSep "::"
6868

69+
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
70+
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
71+
6972
syn region rustString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=rustTodo
7073

7174
syn region rustAttribute start="#\[" end="\]" contains=rustString
@@ -119,6 +122,7 @@ hi def link rustAttribute PreProc
119122
" Other Suggestions:
120123
" hi def link rustModPathSep Conceal
121124
" hi rustAssert ctermfg=yellow
125+
" hi rustFuncCall ctermfg=magenta
122126

123127
syn sync minlines=200
124128
syn sync maxlines=500

trunk/src/libcore/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn clone<T: const send>(rc: &arc<T>) -> arc<T> {
8484
}
8585

8686
// An arc over mutable data that is protected by a lock.
87-
type ex_data<T: send> = {lock: sys::lock_and_signal, data: T};
87+
type ex_data<T: send> = {lock: sys::lock_and_signal, mut data: T};
8888
type exclusive<T: send> = arc_destruct<ex_data<T>>;
8989

9090
fn exclusive<T:send >(-data: T) -> exclusive<T> {
@@ -110,12 +110,12 @@ impl methods<T: send> for exclusive<T> {
110110
arc_destruct(self.data)
111111
}
112112

113-
unsafe fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U {
113+
unsafe fn with<U>(f: fn(sys::condition, x: &mut T) -> U) -> U {
114114
let ptr: ~arc_data<ex_data<T>> =
115115
unsafe::reinterpret_cast(self.data);
116116
let r = {
117117
let rec: &ex_data<T> = &(*ptr).data;
118-
rec.lock.lock_cond(|c| f(c, &rec.data))
118+
rec.lock.lock_cond(|c| f(c, &mut rec.data))
119119
};
120120
unsafe::forget(ptr);
121121
r

trunk/src/libcore/future.rs

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
import either::either;
15+
import pipes::recv;
1516

1617
export future;
1718
export extensions;
@@ -60,10 +61,6 @@ fn from_value<A>(+val: A) -> future<A> {
6061
}
6162

6263
fn macros() {
63-
#macro[
64-
[#recv[chan],
65-
chan.recv()(chan)]
66-
];
6764
#macro[
6865
[#move[x],
6966
unsafe { let y <- *ptr::addr_of(x); y }]
@@ -77,14 +74,13 @@ fn from_port<A:send>(-port: future_pipe::client::waiting<A>) -> future<A> {
7774
The first time that the value is requested the task will block
7875
waiting for the result to be received on the port.
7976
"];
80-
import future_pipe::client::recv;
8177

8278
let port = ~mut some(port);
8379
do from_fn |move port| {
8480
let mut port_ = none;
8581
port_ <-> *port;
8682
let port = option::unwrap(port_);
87-
alt (#recv(port)) {
83+
alt recv(port) {
8884
future_pipe::completed(data, _next) { #move(data) }
8985
}
9086
}
@@ -137,55 +133,12 @@ fn with<A,B>(future: future<A>, blk: fn(A) -> B) -> B {
137133
blk(*v)
138134
}
139135

140-
// The pipe protocol, generated by pipec
141-
/*
142136
proto! future_pipe {
143137
waiting:recv<T:send> {
144138
completed(T) -> terminated
145139
}
146140

147-
terminated { }
148-
}
149-
*/
150-
mod future_pipe {
151-
fn init<T: send>() -> (client::waiting<T>, server::waiting<T>) {
152-
{ let (s, c) = pipes::entangle(); (c, s) }
153-
}
154-
enum waiting<T: send> { completed(T, client::terminated), }
155-
enum terminated { }
156-
mod client {
157-
impl recv<T: send> for waiting<T> {
158-
fn recv() -> extern fn(+waiting<T>) -> future_pipe::waiting<T> {
159-
fn recv<T: send>(+pipe: waiting<T>) ->
160-
future_pipe::waiting<T> {
161-
option::unwrap(pipes::recv(pipe))
162-
}
163-
recv
164-
}
165-
}
166-
type waiting<T: send> = pipes::recv_packet<future_pipe::waiting<T>>;
167-
type terminated = pipes::send_packet<future_pipe::terminated>;
168-
}
169-
mod server {
170-
fn completed<T: send>(+pipe: waiting<T>, +x_0: T) -> terminated {
171-
{
172-
let (s, c) = pipes::entangle();
173-
let message = future_pipe::completed(x_0, s);
174-
pipes::send(pipe, message);
175-
c
176-
}
177-
}
178-
type waiting<T: send> = pipes::send_packet<future_pipe::waiting<T>>;
179-
impl recv for terminated {
180-
fn recv() -> extern fn(+terminated) -> future_pipe::terminated {
181-
fn recv(+pipe: terminated) -> future_pipe::terminated {
182-
option::unwrap(pipes::recv(pipe))
183-
}
184-
recv
185-
}
186-
}
187-
type terminated = pipes::recv_packet<future_pipe::terminated>;
188-
}
141+
terminated:send { }
189142
}
190143

191144
#[test]

0 commit comments

Comments
 (0)