Skip to content

Commit ff3ec50

Browse files
committed
---
yaml --- r: 22453 b: refs/heads/master c: 63df248 h: refs/heads/master i: 22451: c1cd28f v: v3
1 parent ef450b0 commit ff3ec50

File tree

112 files changed

+767
-2034
lines changed

Some content is hidden

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

112 files changed

+767
-2034
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: b9aa9def858cfc66d411972b10ce3d98479acd78
2+
refs/heads/master: 63df2484146a3f2e34aa743ac600eb82620cb70a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/RELEASES.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Version 0.3 (July 2012) - not yet!
2-
-----------------------------------
1+
Version 0.3 (July 2012)
2+
------------------------
33

4-
* ~1500 changes, numerous bugfixes
4+
* ~1900 changes, numerous bugfixes
55

66
* New coding conveniences
77
* Integer-literal suffix inference
@@ -33,7 +33,7 @@ Version 0.3 (July 2012) - not yet!
3333

3434
* Removal of various obsolete features
3535
* Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
36-
'crust', 'native' (now 'extern')
36+
'crust', 'native' (now 'extern'), 'cont' (now 'again')
3737

3838
* Constructs: do-while loops ('do' repurposed), fn binding,
3939
resources (replaced by destructors)

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: copy>(buffalo: buffalo) -> buffalo { buffalo }
2323+
fn buffalo(buffalo: buffalo) -> buffalo { buffalo }
23242324
}
23252325
fn main() {
23262326
let buffalo: buffalo::buffalo = 1;
2327-
buffalo::buffalo::<buffalo::buffalo>(buffalo::buffalo(buffalo));
2327+
buffalo::buffalo(buffalo::buffalo(buffalo));
23282328
}
23292329
~~~~
23302330

trunk/src/cargo/cargo.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// End:
1212

1313
#[link(name = "cargo",
14-
vers = "0.2",
14+
vers = "0.3",
1515
uuid = "9ff87a04-8fed-4295-9ff8-f99bb802650b",
1616
url = "https://github.com/mozilla/rust/tree/master/src/cargo")];
1717

@@ -21,10 +21,10 @@
2121

2222
#[warn(no_non_implicitly_copyable_typarams,no_vecs_not_implicitly_copyable)];
2323

24-
use core(vers = "0.2");
25-
use std(vers = "0.2");
26-
use rustc(vers = "0.2");
27-
use syntax(vers = "0.2");
24+
use core(vers = "0.3");
25+
use std(vers = "0.3");
26+
use rustc(vers = "0.3");
27+
use syntax(vers = "0.3");
2828

2929
import core::*;
3030

trunk/src/compiletest/compiletest.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#[warn(no_vecs_not_implicitly_copyable)];
66

7-
use core(vers = "0.2");
8-
use std(vers = "0.2");
7+
use core(vers = "0.3");
8+
use std(vers = "0.3");
99

1010
import core::*;
1111

trunk/src/etc/pkg/rust.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
SetupIconFile=rust-logo.ico
66
AppName=Rust
77
AppVersion={#CFG_VERSION}
8-
AppCopyright=Copyright (C) 2006-2011 Mozilla Foundation, MIT license
8+
AppCopyright=Copyright (C) 2006-2012 Mozilla Foundation, MIT license
99
AppPublisher=Mozilla Foundation
1010
AppPublisherURL=http://www.rust-lang.org
1111
VersionInfoVersion={#CFG_VERSION}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ 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-
7269
syn region rustString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=rustTodo
7370

7471
syn region rustAttribute start="#\[" end="\]" contains=rustString
@@ -122,7 +119,6 @@ hi def link rustAttribute PreProc
122119
" Other Suggestions:
123120
" hi def link rustModPathSep Conceal
124121
" hi rustAssert ctermfg=yellow
125-
" hi rustFuncCall ctermfg=magenta
126122

127123
syn sync minlines=200
128124
syn sync maxlines=500

trunk/src/fuzzer/fuzzer.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
#[warn(no_vecs_not_implicitly_copyable)];
88

9-
use core(vers = "0.2");
10-
use std(vers = "0.2");
11-
use syntax(vers = "0.2");
9+
use core(vers = "0.3");
10+
use std(vers = "0.3");
11+
use syntax(vers = "0.3");
1212

1313
import core::*;
1414

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, mut data: T};
87+
type ex_data<T: send> = {lock: sys::lock_and_signal, 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: &mut T) -> U) -> U {
113+
unsafe fn with<U>(f: fn(sys::condition, x: &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, &mut rec.data))
118+
rec.lock.lock_cond(|c| f(c, &rec.data))
119119
};
120120
unsafe::forget(ptr);
121121
r

trunk/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[link(name = "core",
2-
vers = "0.2",
2+
vers = "0.3",
33
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
44
url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
55

trunk/src/libcore/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ mod core {
5959
// Similar to above. Some magic to make core testable.
6060
#[cfg(test)]
6161
mod std {
62-
use std(vers = "0.2");
62+
use std(vers = "0.3");
6363
import std::test;
6464
}
6565

trunk/src/libcore/dvec.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,28 @@ export unwrap;
4646
* pointers achieved about 103 million pushes/second. Using an option
4747
* type could only produce 47 million pushes/second.
4848
*/
49-
type dvec_<A> = {
49+
type dvec<A> = {
5050
mut data: ~[mut A]
5151
};
5252

53-
enum dvec<A> {
54-
dvec_(dvec_<A>)
55-
}
56-
5753
/// Creates a new, empty dvec
5854
fn dvec<A>() -> dvec<A> {
59-
dvec_({mut data: ~[mut]})
55+
{mut data: ~[mut]}
6056
}
6157

6258
/// Creates a new dvec with a single element
6359
fn from_elem<A>(+e: A) -> dvec<A> {
64-
dvec_({mut data: ~[mut e]})
60+
{mut data: ~[mut e]}
6561
}
6662

6763
/// Creates a new dvec with the contents of a vector
6864
fn from_vec<A>(+v: ~[mut A]) -> dvec<A> {
69-
dvec_({mut data: v})
65+
{mut data: v}
7066
}
7167

7268
/// Consumes the vector and returns its contents
7369
fn unwrap<A>(-d: dvec<A>) -> ~[mut A] {
74-
let dvec_({data: v}) <- d;
70+
let {data: v} <- d;
7571
ret v;
7672
}
7773

trunk/src/libcore/future.rs

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

1414
import either::either;
15-
import pipes::recv;
1615

1716
export future;
1817
export extensions;
@@ -61,6 +60,10 @@ fn from_value<A>(+val: A) -> future<A> {
6160
}
6261

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

7882
let port = ~mut some(port);
7983
do from_fn |move port| {
8084
let mut port_ = none;
8185
port_ <-> *port;
8286
let port = option::unwrap(port_);
83-
alt recv(port) {
87+
alt (#recv(port)) {
8488
future_pipe::completed(data, _next) { #move(data) }
8589
}
8690
}
@@ -133,12 +137,55 @@ fn with<A,B>(future: future<A>, blk: fn(A) -> B) -> B {
133137
blk(*v)
134138
}
135139

140+
// The pipe protocol, generated by pipec
141+
/*
136142
proto! future_pipe {
137143
waiting:recv<T:send> {
138144
completed(T) -> terminated
139145
}
140146
141-
terminated:send { }
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+
}
142189
}
143190

144191
#[test]

trunk/src/libcore/iter-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl extensions<A> of iter::base_iter<A> for IMPL_T<A> {
2121
}
2222
}
2323

24-
impl extensions<A:copy> of iter::copyable_iter<A> for IMPL_T<A> {
24+
impl extensions<A:copy> for IMPL_T<A> {
2525
fn filter_to_vec(pred: fn(A) -> bool) -> ~[A] {
2626
iter::filter_to_vec(self, pred)
2727
}

trunk/src/libcore/iter.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ iface times {
77
fn times(it: fn() -> bool);
88
}
99

10-
trait copyable_iter<A:copy> {
11-
fn filter_to_vec(pred: fn(A) -> bool) -> ~[A];
12-
fn map_to_vec<B>(op: fn(A) -> B) -> ~[B];
13-
fn to_vec() -> ~[A];
14-
fn min() -> A;
15-
fn max() -> A;
16-
fn find(p: fn(A) -> bool) -> option<A>;
17-
}
18-
1910
fn eachi<A,IA:base_iter<A>>(self: IA, blk: fn(uint, A) -> bool) {
2011
let mut i = 0u;
2112
for self.each |a| {

0 commit comments

Comments
 (0)