Skip to content

Commit 2b47ee1

Browse files
committed
---
yaml --- r: 138106 b: refs/heads/try c: f27ad3d h: refs/heads/master v: v3
1 parent 3dcae56 commit 2b47ee1

File tree

101 files changed

+532
-674
lines changed

Some content is hidden

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

101 files changed

+532
-674
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b6e0d3a5bf4c88650a22f605f822e02c6b163580
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5-
refs/heads/try: 0dd4cd57fe032e24799e007636989d44f579438f
5+
refs/heads/try: f27ad3d3e99ce679f782607971a9f6f18befa503
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fetch snapshots, and an OS that can execute the available snapshot binaries.
8787

8888
Snapshot binaries are currently built and tested on several platforms:
8989

90-
* Windows (7, 8, Server 2008 R2), x86 and x86-64 (64-bit support added in Rust 0.12.0)
90+
* Windows (7, 8, Server 2008 R2), x86 only
9191
* Linux (2.6.18 or later, various distributions), x86 and x86-64
9292
* OSX 10.7 (Lion) or greater, x86 and x86-64
9393

branches/try/src/compiletest/runtest.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,12 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
947947
String::from_chars(c.as_slice())
948948
}
949949

950-
#[cfg(target_os = "windows")]
950+
#[cfg(windows)]
951951
fn prefix_matches( line : &str, prefix : &str ) -> bool {
952952
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
953953
}
954954

955-
#[cfg(any(target_os = "linux",
956-
target_os = "macos",
957-
target_os = "freebsd",
958-
target_os = "dragonfly"))]
955+
#[cfg(unix)]
959956
fn prefix_matches( line : &str, prefix : &str ) -> bool {
960957
line.starts_with( prefix )
961958
}
@@ -1356,24 +1353,21 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
13561353
}
13571354

13581355
// Linux and mac don't require adjusting the library search path
1359-
#[cfg(any(target_os = "linux",
1360-
target_os = "macos",
1361-
target_os = "freebsd",
1362-
target_os = "dragonfly"))]
1356+
#[cfg(unix)]
13631357
fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
13641358
format!("{} {}", prog, args.connect(" "))
13651359
}
13661360

1367-
#[cfg(target_os = "windows")]
1361+
#[cfg(windows)]
13681362
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
1369-
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
1370-
}
13711363

1372-
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1373-
// for diagnostic purposes
1374-
#[cfg(target_os = "windows")]
1375-
fn lib_path_cmd_prefix(path: &str) -> String {
1376-
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1364+
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1365+
// for diagnostic purposes
1366+
fn lib_path_cmd_prefix(path: &str) -> String {
1367+
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1368+
}
1369+
1370+
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
13771371
}
13781372

13791373
fn dump_output(config: &Config, testfile: &Path, out: &str, err: &str) {

branches/try/src/doc/README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Rust documentations
2-
3-
## Dependencies
1+
# Dependencies
42

53
[Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
64
document converter, is required to generate docs as HTML from Rust's
@@ -12,7 +10,7 @@ docs from the master (English) docs.
1210
[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
1311
the translation data.
1412

15-
## Building
13+
# Building
1614

1715
To generate all the docs, just run `make docs` from the root of the repository.
1816
This will convert the distributed Markdown docs to HTML and generate HTML doc
@@ -26,7 +24,7 @@ rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2624

2725
(This, of course, requires a working build of the `rustdoc` tool.)
2826

29-
## Additional notes
27+
# Additional notes
3028

3129
To generate an HTML version of a doc from Markdown manually, you can do
3230
something like:
@@ -35,39 +33,37 @@ something like:
3533
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
3634
~~~~
3735

38-
(`reference.md` being the Rust Reference Manual.)
36+
(reference.md being the Rust Reference Manual.)
3937

4038
The syntax for pandoc flavored markdown can be found at:
41-
42-
- http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
39+
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
4340

4441
A nice quick reference (for non-pandoc markdown) is at:
42+
http://kramdown.rubyforge.org/quickref.html
4543

46-
- http://kramdown.gettalong.org/quickref.html
47-
48-
## Notes for translators
44+
# Notes for translators
4945

5046
Notice: The procedure described below is a work in progress. We are working on
5147
translation system but the procedure contains some manual operations for now.
5248

53-
To start the translation for a new language, see `po4a.conf` at first.
49+
To start the translation for a new language, see po4a.conf at first.
5450

55-
To generate `.pot` and `.po` files, do something like:
51+
To generate .pot and .po files, do something like:
5652

5753
~~~~
5854
po4a --copyright-holder="The Rust Project Developers" \
5955
--package-name="Rust" \
60-
--package-version="0.13.0" \
56+
--package-version="0.11.0" \
6157
-M UTF-8 -L UTF-8 \
6258
src/doc/po4a.conf
6359
~~~~
6460

65-
(the version number must be changed if it is not `0.13.0` now.)
61+
(the version number must be changed if it is not 0.11.0 now.)
6662

67-
Now you can translate documents with `.po` files, commonly used with gettext. If
63+
Now you can translate documents with .po files, commonly used with gettext. If
6864
you are not familiar with gettext-based translation, please read the online
6965
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
70-
file encoding of `.po` files.
66+
file encoding of .po files.
7167

7268
When you want to make a commit, do the command below before staging your
7369
change:
@@ -83,4 +79,4 @@ for f in src/doc/po/**/*.po; do
8379
done
8480
~~~~
8581

86-
This removes untranslated entries from `.po` files to save disk space.
82+
This removes untranslated entries from .po files to save disk space.

branches/try/src/doc/guide-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ conventions. Rust provides a way to tell the compiler which convention to use:
475475
~~~~
476476
extern crate libc;
477477

478-
#[cfg(all(target_os = "win32", target_arch = "x86"))]
478+
#[cfg(target_os = "win32", target_arch = "x86")]
479479
#[link(name = "kernel32")]
480480
#[allow(non_snake_case)]
481481
extern "stdcall" {

branches/try/src/doc/guide-unsafe.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,17 @@ literal string (i.e `""`)
313313
```
314314
#![feature(asm)]
315315
316-
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
316+
#[cfg(target_arch = "x86")]
317+
#[cfg(target_arch = "x86_64")]
317318
fn foo() {
318319
unsafe {
319320
asm!("NOP");
320321
}
321322
}
322323
323324
// other platforms
324-
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
325+
#[cfg(not(target_arch = "x86"),
326+
not(target_arch = "x86_64"))]
325327
fn foo() { /* ... */ }
326328
327329
fn main() {
@@ -338,7 +340,7 @@ but you must add the right number of `:` if you skip them:
338340

339341
```
340342
# #![feature(asm)]
341-
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
343+
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
342344
# fn main() { unsafe {
343345
asm!("xor %eax, %eax"
344346
:
@@ -352,7 +354,7 @@ Whitespace also doesn't matter:
352354

353355
```
354356
# #![feature(asm)]
355-
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
357+
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
356358
# fn main() { unsafe {
357359
asm!("xor %eax, %eax" ::: "eax");
358360
# } }
@@ -366,7 +368,7 @@ expressions must be mutable lvalues:
366368

367369
```
368370
# #![feature(asm)]
369-
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
371+
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
370372
fn add(a: int, b: int) -> int {
371373
let mut c = 0;
372374
unsafe {
@@ -377,7 +379,7 @@ fn add(a: int, b: int) -> int {
377379
}
378380
c
379381
}
380-
# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
382+
# #[cfg(not(target_arch = "x86"), not(target_arch = "x86_64"))]
381383
# fn add(a: int, b: int) -> int { a + b }
382384
383385
fn main() {
@@ -394,7 +396,7 @@ stay valid.
394396

395397
```
396398
# #![feature(asm)]
397-
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
399+
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
398400
# fn main() { unsafe {
399401
// Put the value 0x200 in eax
400402
asm!("mov $$0x200, %eax" : /* no outputs */ : /* no inputs */ : "eax");

branches/try/src/doc/reference.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -185,24 +185,40 @@ grammar as double-quoted strings. Other tokens have exact rules given.
185185

186186
### Keywords
187187

188-
<p id="keyword-table-marker">The keywords are the following strings, organized by first letter:</p>
188+
The keywords are the following strings, organized by first letter:
189189

190+
<div id="keywords">
190191
| | | | |
191192
|----------|--------|--------|-------|
192193
| as | | | |
194+
|----------|--------|--------|-------|
193195
| box | break | | |
196+
|----------|--------|--------|-------|
194197
| continue | crate | | |
198+
|----------|--------|--------|-------|
195199
| else | enum | extern | |
200+
|----------|--------|--------|-------|
196201
| false | fn | for | |
202+
|----------|--------|--------|-------|
197203
| if | impl | in | |
204+
|----------|--------|--------|-------|
198205
| let | loop | | |
206+
|----------|--------|--------|-------|
199207
| match | mod | mut | |
208+
|----------|--------|--------|-------|
200209
| priv | proc | pub | |
210+
|----------|--------|--------|-------|
201211
| ref | return | | |
212+
|----------|--------|--------|-------|
202213
| self | static | struct | super |
214+
|----------|--------|--------|-------|
203215
| trait | true | type | |
216+
|----------|--------|--------|-------|
204217
| unsafe | use | | |
218+
|----------|--------|--------|-------|
205219
| while | | | |
220+
|----------|--------|--------|-------|
221+
</div>
206222

207223
Each of these keywords has special meaning in its grammar, and all of them are
208224
excluded from the `ident` rule.
@@ -2033,28 +2049,26 @@ fn macos_only() {
20332049
}
20342050
20352051
// This function is only included when either foo or bar is defined
2036-
#[cfg(any(foo, bar))]
2052+
#[cfg(foo)]
2053+
#[cfg(bar)]
20372054
fn needs_foo_or_bar() {
20382055
// ...
20392056
}
20402057
20412058
// This function is only included when compiling for a unixish OS with a 32-bit
20422059
// architecture
2043-
#[cfg(all(unix, target_word_size = "32"))]
2060+
#[cfg(unix, target_word_size = "32")]
20442061
fn on_32bit_unix() {
20452062
// ...
20462063
}
2047-
2048-
// This function is only included when foo is not defined
2049-
#[cfg(not(foo))]
2050-
fn needs_not_foo() {
2051-
// ...
2052-
}
20532064
```
20542065

20552066
This illustrates some conditional compilation can be achieved using the
2056-
`#[cfg(...)]` attribute. `any`, `all` and `not` can be used to assemble
2057-
arbitrarily complex configurations through nesting.
2067+
`#[cfg(...)]` attribute. Note that `#[cfg(foo, bar)]` is a condition that needs
2068+
both `foo` and `bar` to be defined while `#[cfg(foo)] #[cfg(bar)]` only needs
2069+
one of `foo` and `bar` to be defined (this resembles in the disjunctive normal
2070+
form). Additionally, one can reverse a condition by enclosing it in a
2071+
`not(...)`, like e. g. `#[cfg(not(target_os = "win32"))]`.
20582072

20592073
The following configurations must be defined by the implementation:
20602074

@@ -2472,8 +2486,6 @@ The currently implemented features of the reference compiler are:
24722486

24732487
* `if_let` - Allows use of the `if let` syntax.
24742488

2475-
* `while_let` - Allows use of the `while let` syntax.
2476-
24772489
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
24782490
are inherently unstable and no promise about them is made.
24792491

@@ -3480,18 +3492,6 @@ of a condition expression it expects a refutable let statement. If the value of
34803492
expression on the right hand side of the let statement matches the pattern, the corresponding
34813493
block will execute, otherwise flow proceeds to the first `else` block that follows.
34823494

3483-
### While let loops
3484-
3485-
```{.ebnf .gram}
3486-
while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
3487-
```
3488-
3489-
A `while let` loop is semantically identical to a `while` loop but in place of a
3490-
condition expression it expects a refutable let statement. If the value of the
3491-
expression on the right hand side of the let statement matches the pattern, the
3492-
loop body block executes and control returns to the pattern matching statement.
3493-
Otherwise, the while expression completes.
3494-
34953495
### Return expressions
34963496

34973497
```{.ebnf .gram}

branches/try/src/doc/rust.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,4 @@ pre.rust { position: relative; }
393393
}
394394
}
395395

396-
#keyword-table-marker + table thead { display: none; }
397-
#keyword-table-marker + table td { border: none; }
398-
#keyword-table-marker + table {
399-
margin-left: 2em;
400-
margin-bottom: 1em;
401-
}
396+
#keywords table td { border: none; }

branches/try/src/liballoc/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ impl<T: Sync + Send> Drop for Weak<T> {
276276
#[allow(experimental)]
277277
mod tests {
278278
use std::clone::Clone;
279-
use std::collections::MutableSeq;
280279
use std::comm::channel;
281280
use std::mem::drop;
282281
use std::ops::Drop;

branches/try/src/libcollections/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
//! bv.set(0, false);
3434
//! bv.set(1, false);
3535
//!
36-
//! for i in iter::range_inclusive(2, (max_prime as f64).sqrt() as uint) {
36+
//! for i in range(2, max_prime) {
3737
//! // if i is a prime
3838
//! if bv[i] {
3939
//! // Mark all multiples of i as non-prime (any multiples below i * i
@@ -2659,7 +2659,7 @@ mod tests {
26592659
let mut r = rng();
26602660
let mut bitv = Bitv::with_capacity(BENCH_BITS, false);
26612661
b.iter(|| {
2662-
for i in range(0u, 100) {
2662+
for _ in range(0u, 100) {
26632663
bitv.set((r.next_u32() as uint) % BENCH_BITS, r.gen());
26642664
}
26652665
&bitv

branches/try/src/libcollections/dlist.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,13 @@ mod tests {
890890
}
891891

892892
let v = vec![1i,2,3,4,5];
893-
let u = vec![9i,8,1,2,3,4,5];
893+
let mut u = vec![9i,8,1,2,3,4,5];
894894
let mut m = list_from(v.as_slice());
895895
m.prepend(list_from(u.as_slice()));
896896
check_links(&m);
897-
let sum = u.append(v.as_slice());
898-
assert_eq!(sum.len(), m.len());
899-
for elt in sum.into_iter() {
897+
u.extend(v.as_slice().iter().map(|&b| b));
898+
assert_eq!(u.len(), m.len());
899+
for elt in u.into_iter() {
900900
assert_eq!(m.pop_front(), Some(elt))
901901
}
902902
}

0 commit comments

Comments
 (0)