Skip to content

Commit d4c0c76

Browse files
committed
---
yaml --- r: 90009 b: refs/heads/master c: b3ff24a h: refs/heads/master i: 90007: 7399180 v: v3
1 parent 03af61a commit d4c0c76

File tree

355 files changed

+6738
-4463
lines changed

Some content is hidden

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

355 files changed

+6738
-4463
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: e1d1ad34f7d28eeb2af2e17097615b74498a1511
2+
refs/heads/master: b3ff24adaa8c7f9c48c525f284526c23ffd33fcb
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ config.stamp
8989
src/etc/dl
9090
.settings/
9191
build/
92+
i686-pc-mingw32/

trunk/configure

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,20 @@ then
520520
fi
521521
fi
522522

523+
BIN_SUF=
524+
if [ $CFG_OSTYPE = "pc-mingw32" ]
525+
then
526+
BIN_SUF=.exe
527+
fi
528+
523529
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
524530
then
525-
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ]
531+
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
526532
then
527533
err "no local rust to use"
528534
else
529-
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version`
530-
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: " $LRV
535+
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
536+
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
531537
fi
532538
fi
533539

trunk/doc/favicon.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />

trunk/doc/manual.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44
display: block;
55
padding-left: 2em;
66
}
7-
</style>
7+
#influences blockquote p:last-child {
8+
display: block;
9+
line-height: 1.428571429;
10+
color: #999999;
11+
}
12+
</style>

trunk/doc/po/ja/tutorial-tasks.md.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ msgstr ""
213213
#. type: Plain text
214214
#: doc/tutorial-tasks.md:102
215215
msgid ""
216-
"The `spawn` function has a very simple type signature: `fn spawn(f: ~fn())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
217217
"Because it accepts only owned closures, and owned closures contain only "
218218
"owned data, `spawn` can safely move the entire closure and all its "
219219
"associated state into an entirely different task for execution. Like any "
@@ -529,7 +529,7 @@ msgid ""
529529
"The basic example below illustrates this.\n"
530530
"~~~\n"
531531
"# fn make_a_sandwich() {};\n"
532-
"fn fib(n: uint) -> uint {\n"
532+
"fn fib(n: u64) -> u64 {\n"
533533
" // lengthy computation returning an uint\n"
534534
" 12586269025\n"
535535
"}\n"

trunk/doc/po/ja/tutorial.md.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,13 +3509,13 @@ msgstr "## 所有クロージャ"
35093509
#. type: Plain text
35103510
#: doc/tutorial.md:1510
35113511
msgid ""
3512-
"Owned closures, written `~fn` in analogy to the `~` pointer type, hold on to "
3512+
"Owned closures, written `proc`, hold on to "
35133513
"things that can safely be sent between processes. They copy the values they "
35143514
"close over, much like managed closures, but they also own them: that is, no "
35153515
"other code can access them. Owned closures are used in concurrent code, "
35163516
"particularly for spawning [tasks][tasks]."
35173517
msgstr ""
3518-
"`~` ポインタ型と同様に `~fn` 型 で書き表される所有クロージャは安全にプロセス"
3518+
"`~` `proc` で書き表される所有クロージャは安全にプロセス"
35193519
"間で送信することができます。所有クローじゃはマネージドクロージャと全く同じよ"
35203520
"うに閉じ込める値をコピーしますが、値を所有します。つまり、他のコードは閉じ込"
35213521
"められた値にアクセスできなくなります。所有クロージャは並列プログラム、特に "
@@ -3666,11 +3666,11 @@ msgstr ""
36663666
#: doc/tutorial.md:1582
36673667
msgid ""
36683668
"`do` is a convenient way to create tasks with the `task::spawn` function. "
3669-
"`spawn` has the signature `spawn(fn: ~fn())`. In other words, it is a "
3669+
"`spawn` has the signature `spawn(fn: proc())`. In other words, it is a "
36703670
"function that takes an owned closure that takes no arguments."
36713671
msgstr ""
36723672
"`task::spawn` 関数を用いてタスクを生成する場合、 `do` を用いると便利です。"
3673-
"`spawn` は、 `spawn(fn: ~fn())` という方を持っています。言い換えると、"
3673+
"`spawn` は、 `spawn(fn: proc())` という方を持っています。言い換えると、"
36743674
"`spawn` は「引数をとらない所有クロージャ」を引数としてとる関数ということで"
36753675
"す。"
36763676

trunk/doc/po/tutorial-tasks.md.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ msgstr ""
213213
#. type: Plain text
214214
#: doc/tutorial-tasks.md:102
215215
msgid ""
216-
"The `spawn` function has a very simple type signature: `fn spawn(f: ~fn())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
217217
"Because it accepts only owned closures, and owned closures contain only "
218218
"owned data, `spawn` can safely move the entire closure and all its "
219219
"associated state into an entirely different task for execution. Like any "
@@ -529,7 +529,7 @@ msgid ""
529529
"The basic example below illustrates this.\n"
530530
"~~~\n"
531531
"# fn make_a_sandwich() {};\n"
532-
"fn fib(n: uint) -> uint {\n"
532+
"fn fib(n: u64) -> u64 {\n"
533533
" // lengthy computation returning an uint\n"
534534
" 12586269025\n"
535535
"}\n"

trunk/doc/po/tutorial.md.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,7 @@ msgstr ""
26832683
#. type: Plain text
26842684
#: doc/tutorial.md:1510
26852685
msgid ""
2686-
"Owned closures, written `~fn` in analogy to the `~` pointer type, hold on to "
2686+
"Owned closures, written `proc`, hold on to "
26872687
"things that can safely be sent between processes. They copy the values they "
26882688
"close over, much like managed closures, but they also own them: that is, no "
26892689
"other code can access them. Owned closures are used in concurrent code, "
@@ -2808,7 +2808,7 @@ msgstr ""
28082808
#: doc/tutorial.md:1582
28092809
msgid ""
28102810
"`do` is a convenient way to create tasks with the `task::spawn` function. "
2811-
"`spawn` has the signature `spawn(fn: ~fn())`. In other words, it is a "
2811+
"`spawn` has the signature `spawn(fn: proc())`. In other words, it is a "
28122812
"function that takes an owned closure that takes no arguments."
28132813
msgstr ""
28142814

trunk/doc/rust.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2013 The Rust Project Developers. See the COPYRIGHT
33
* file at the top-level directory of this distribution and at
44
* http://rust-lang.org/COPYRIGHT.
5-
* With elements taken from Bootstrap v3.0.0 (Apache v2.0 licensed).
5+
* With elements taken from Bootstrap v3.0.2 (MIT licensed).
66
*
77
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
88
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
@@ -93,6 +93,7 @@ p {
9393
a {
9494
text-decoration: none;
9595
color: #428BCA;
96+
background: transparent;
9697
}
9798
a:hover, a:focus {
9899
color: #2A6496;
@@ -114,7 +115,7 @@ h5 a:link, h5 a:visited {color: black;}
114115
/* Code
115116
========================================================================== */
116117
pre, code {
117-
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
118+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
118119
border-radius: 4px;
119120
}
120121
pre {
@@ -141,7 +142,7 @@ pre code {
141142
color: inherit;
142143
white-space: pre-wrap;
143144
background-color: transparent;
144-
border: 0;
145+
border-radius: 0;
145146
}
146147

147148
/* Code highlighting */
@@ -158,7 +159,7 @@ pre code {
158159
.cm-s-default span.cm-string {color: #a11;}
159160
.cm-s-default span.cm-string-2 {color: #f50;}
160161
.cm-s-default span.cm-meta {color: #555;}
161-
.cm-s-default span.cm-error {color: #f00;}
162+
/*.cm-s-default span.cm-error {color: #f00;}*/
162163
.cm-s-default span.cm-qualifier {color: #555;}
163164
.cm-s-default span.cm-builtin {color: #30a;}
164165
.cm-s-default span.cm-bracket {color: #cc7;}
@@ -187,7 +188,7 @@ pre code {
187188
}
188189
#versioninfo a.hash {
189190
color: gray;
190-
font-size: 60%;
191+
font-size: 70%;
191192
}
192193

193194
blockquote {
@@ -303,4 +304,4 @@ hr {
303304
table td, table th {
304305
background-color: #fff !important;
305306
}
306-
}
307+
}

trunk/doc/rust.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ common_escape : '\x5c'
254254
hex_digit : 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
255255
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
256256
| dec_digit ;
257+
oct_digit : '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' ;
257258
dec_digit : '0' | nonzero_dec ;
258259
nonzero_dec: '1' | '2' | '3' | '4'
259260
| '5' | '6' | '7' | '8' | '9' ;
@@ -318,8 +319,9 @@ r##"foo #"# bar"##; // foo #"# bar
318319
~~~~ {.ebnf .gram}
319320
320321
num_lit : nonzero_dec [ dec_digit | '_' ] * num_suffix ?
321-
| '0' [ [ dec_digit | '_' ] + num_suffix ?
322+
| '0' [ [ dec_digit | '_' ] * num_suffix ?
322323
| 'b' [ '1' | '0' | '_' ] + int_suffix ?
324+
| 'o' [ oct_digit | '_' ] + int_suffix ?
323325
| 'x' [ hex_digit | '_' ] + int_suffix ? ] ;
324326
325327
num_suffix : int_suffix | float_suffix ;
@@ -1129,9 +1131,8 @@ block.
11291131
let fptr: extern "C" fn() -> ~[int] = new_vec;
11301132
~~~~
11311133

1132-
Extern functions may be called from Rust code, but
1133-
caution must be taken with respect to the size of the stack
1134-
segment, just as when calling an extern function normally.
1134+
Extern functions may be called directly from Rust code as Rust uses large,
1135+
contiguous stack segments like C.
11351136

11361137
### Type definitions
11371138

@@ -1548,6 +1549,7 @@ keyword for struct fields and enum variants). When an item is declared as `pub`,
15481549
it can be thought of as being accessible to the outside world. For example:
15491550

15501551
~~~~
1552+
# fn main() {}
15511553
// Declare a private struct
15521554
struct Foo;
15531555
@@ -3159,7 +3161,7 @@ Borrowed pointers (`&`)
31593161
Borrowed pointers arise by (automatic) conversion from owning pointers, managed pointers,
31603162
or by applying the borrowing operator `&` to some other value,
31613163
including [lvalues, rvalues or temporaries](#lvalues-rvalues-and-temporaries).
3162-
Borrowed pointers are written `&content`, or in some cases `&f/content` for some lifetime-variable `f`,
3164+
Borrowed pointers are written `&content`, or in some cases `&'f content` for some lifetime-variable `f`,
31633165
for example `&int` means a borrowed pointer to an integer.
31643166
Copying a borrowed pointer is a "shallow" operation:
31653167
it involves only copying the pointer itself.
@@ -3594,9 +3596,9 @@ and releases them back to its environment when they are no longer needed.
35943596
The default implementation of the service-provider interface
35953597
consists of the C runtime functions `malloc` and `free`.
35963598

3597-
The runtime memory-management system, in turn, supplies Rust tasks
3598-
with facilities for allocating, extending and releasing stacks,
3599-
as well as allocating and freeing heap data.
3599+
The runtime memory-management system, in turn, supplies Rust tasks with
3600+
facilities for allocating releasing stacks, as well as allocating and freeing
3601+
heap data.
36003602

36013603
### Built in types
36023604

@@ -3759,7 +3761,6 @@ have come and gone during the course of Rust's development:
37593761

37603762
Additional specific influences can be seen from the following languages:
37613763

3762-
* The stack-growth implementation of Go.
37633764
* The structural algebraic types and compilation manager of SML.
37643765
* The attribute and assembly systems of C#.
37653766
* The references and deterministic destructor system of C++.

trunk/doc/rustpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Thus, there should be no need to pass a `-L` flag to rustpkg to tell it where to
120120

121121
# Custom build scripts
122122

123-
A file called `pkg.rs` at the root level in a workspace is called a *package script*.
123+
A file called `pkg.rs` at the root level in a package directory is called a *package script*.
124124
If a package script exists, rustpkg executes it to build the package
125125
rather than inferring crates as described previously.
126126

trunk/doc/tutorial-container.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Reaching the end of the iterator is signalled by returning `None` instead of
8787
`Some(item)`:
8888
8989
~~~
90+
# fn main() {}
9091
/// A stream of N zeroes
9192
struct ZeroStream {
9293
priv remaining: uint
@@ -301,6 +302,7 @@ the iterator can provide better information.
301302
The `ZeroStream` from earlier can provide an exact lower and upper bound:
302303

303304
~~~
305+
# fn main() {}
304306
/// A stream of N zeroes
305307
struct ZeroStream {
306308
priv remaining: uint

trunk/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ conventions. Rust provides a way to tell the compiler which convention to use:
303303
#[cfg(target_os = "win32", target_arch = "x86")]
304304
#[link_name = "kernel32"]
305305
extern "stdcall" {
306-
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> int;
306+
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> std::libc::c_int;
307307
}
308308
~~~~
309309

trunk/doc/tutorial-macros.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@ solves the problem.
210210

211211
# Macro argument pattern matching
212212

213-
Now consider code like the following:
214-
215213
## Motivation
216214

215+
Now consider code like the following:
216+
217217
~~~~
218218
# enum t1 { good_1(t2, uint), bad_1 };
219-
# pub struct t2 { body: t3 }
219+
# struct t2 { body: t3 }
220220
# enum t3 { good_2(uint), bad_2};
221221
# fn f(x: t1) -> uint {
222222
match x {
@@ -262,7 +262,7 @@ macro_rules! biased_match (
262262
)
263263
264264
# enum t1 { good_1(t2, uint), bad_1 };
265-
# pub struct t2 { body: t3 }
265+
# struct t2 { body: t3 }
266266
# enum t3 { good_2(uint), bad_2};
267267
# fn f(x: t1) -> uint {
268268
biased_match!((x) ~ (good_1(g1, val)) else { return 0 };
@@ -364,7 +364,7 @@ macro_rules! biased_match (
364364
365365
366366
# enum t1 { good_1(t2, uint), bad_1 };
367-
# pub struct t2 { body: t3 }
367+
# struct t2 { body: t3 }
368368
# enum t3 { good_2(uint), bad_2};
369369
# fn f(x: t1) -> uint {
370370
biased_match!(

trunk/doc/tutorial-rustpkg.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ $ rustc main.rs
2727
main.rs:1:0: 1:17 error: can't find crate for `hello`
2828
main.rs:1 extern mod hello;
2929
^~~~~~~~~~~~~~~~~
30-
3130
~~~~
3231

3332
This makes sense, as we haven't gotten it from anywhere yet! Luckily for us,
@@ -216,7 +215,7 @@ a function that can be sensibly tested:
216215
#[license = "MIT"];
217216
218217
pub fn is_even(i: uint) -> bool {
219-
i % 2 == 0
218+
i % 2 == 0
220219
}
221220
~~~
222221

@@ -230,9 +229,9 @@ use hello::is_even;
230229
231230
#[test]
232231
fn test_is_even() {
233-
assert!(is_even(0));
234-
assert!(!is_even(1));
235-
assert!(is_even(2));
232+
assert!(is_even(0));
233+
assert!(!is_even(1));
234+
assert!(is_even(2));
236235
}
237236
~~~
238237

trunk/doc/tutorial-tasks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ _owned types_. The language leaves the implementation details to the standard
9191
library.
9292

9393
The `spawn` function has a very simple type signature: `fn spawn(f:
94-
~fn())`. Because it accepts only owned closures, and owned closures
94+
proc())`. Because it accepts only owned closures, and owned closures
9595
contain only owned data, `spawn` can safely move the entire closure
9696
and all its associated state into an entirely different task for
9797
execution. Like any closure, the function passed to `spawn` may capture
@@ -104,8 +104,8 @@ an environment that it carries across tasks.
104104
let child_task_number = generate_task_number();
105105
106106
do spawn {
107-
// Capture it in the remote task
108-
println!("I am child number {}", child_task_number);
107+
// Capture it in the remote task
108+
println!("I am child number {}", child_task_number);
109109
}
110110
~~~
111111

@@ -273,7 +273,7 @@ later.
273273
The basic example below illustrates this.
274274
~~~
275275
# fn make_a_sandwich() {};
276-
fn fib(n: uint) -> uint {
276+
fn fib(n: u64) -> u64 {
277277
// lengthy computation returning an uint
278278
12586269025
279279
}

0 commit comments

Comments
 (0)