Skip to content

Commit a24da73

Browse files
committed
---
yaml --- r: 126332 b: refs/heads/auto c: a9979ad h: refs/heads/master v: v3
1 parent a2ac5d9 commit a24da73

File tree

53 files changed

+267
-1003
lines changed

Some content is hidden

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

53 files changed

+267
-1003
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 6da38890f1f734799dc06460edf26c560db59a8e
16+
refs/heads/auto: a9979ada477c74be567f8df47ae8bd9a8b75f192
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/guide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,14 +1647,14 @@ $ cargo build
16471647
$
16481648
```
16491649

1650-
Excellent! Open up your `src/main.rs` again. We'll be writing all of
1650+
Excellent! Open up your `src/guessing_game.rs` again. We'll be writing all of
16511651
our code in this file. We'll talk about multiple-file projects later on in the
16521652
guide.
16531653

16541654
## Processing a Guess
16551655

16561656
Let's get to it! The first thing we need to do for our guessing game is
1657-
allow our player to input a guess. Put this in your `src/main.rs`:
1657+
allow our player to input a guess. Put this in your `src/guessing_game.rs`:
16581658

16591659
```{rust,no_run}
16601660
use std::io;
@@ -1734,9 +1734,9 @@ this using `cargo build`:
17341734
```{notrust,no_run}
17351735
$ cargo build
17361736
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
1737-
src/main.rs:7:26: 7:34 error: the type of this value must be known in this context
1738-
src/main.rs:7 let secret_number = (rand::random() % 100i) + 1i;
1739-
^~~~~~~~
1737+
src/guessing_game.rs:7:26: 7:34 error: the type of this value must be known in this context
1738+
src/guessing_game.rs:7 let secret_number = (rand::random() % 100i) + 1i;
1739+
^~~~~~~~
17401740
error: aborting due to previous error
17411741
```
17421742

@@ -1896,12 +1896,12 @@ If we try to compile, we'll get some errors:
18961896
```{notrust,ignore}
18971897
$ cargo build
18981898
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
1899-
src/main.rs:20:15: 20:20 error: mismatched types: expected `int` but found `collections::string::String` (expected int but found struct collections::string::String)
1900-
src/main.rs:20 match cmp(input, secret_number) {
1901-
^~~~~
1902-
src/main.rs:20:22: 20:35 error: mismatched types: expected `int` but found `uint` (expected int but found uint)
1903-
src/main.rs:20 match cmp(input, secret_number) {
1904-
^~~~~~~~~~~~~
1899+
src/guessing_game.rs:20:15: 20:20 error: mismatched types: expected `int` but found `collections::string::String` (expected int but found struct collections::string::String)
1900+
src/guessing_game.rs:20 match cmp(input, secret_number) {
1901+
^~~~~
1902+
src/guessing_game.rs:20:22: 20:35 error: mismatched types: expected `int` but found `uint` (expected int but found uint)
1903+
src/guessing_game.rs:20 match cmp(input, secret_number) {
1904+
^~~~~~~~~~~~~
19051905
error: aborting due to 2 previous errors
19061906
```
19071907

@@ -1950,9 +1950,9 @@ And try compiling again:
19501950
```{notrust,ignore}
19511951
$ cargo build
19521952
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
1953-
src/main.rs:20:15: 20:20 error: mismatched types: expected `uint` but found `collections::string::String` (expected uint but found struct collections::string::String)
1954-
src/main.rs:20 match cmp(input, secret_number) {
1955-
^~~~~
1953+
src/guessing_game.rs:20:15: 20:20 error: mismatched types: expected `uint` but found `collections::string::String` (expected uint but found struct collections::string::String)
1954+
src/guessing_game.rs:20 match cmp(input, secret_number) {
1955+
^~~~~
19561956
error: aborting due to previous error
19571957
```
19581958

@@ -2053,9 +2053,9 @@ Let's try it out!
20532053
```{notrust,ignore}
20542054
$ cargo build
20552055
Compiling guessing_game v0.1.0 (file:/home/you/projects/guessing_game)
2056-
src/main.rs:22:15: 22:24 error: mismatched types: expected `uint` but found `core::option::Option<uint>` (expected uint but found enum core::option::Option)
2057-
src/main.rs:22 match cmp(input_num, secret_number) {
2058-
^~~~~~~~~
2056+
src/guessing_game.rs:22:15: 22:24 error: mismatched types: expected `uint` but found `core::option::Option<uint>` (expected uint but found enum core::option::Option)
2057+
src/guessing_game.rs:22 match cmp(input_num, secret_number) {
2058+
^~~~~~~~~
20592059
error: aborting due to previous error
20602060
```
20612061

branches/auto/src/doc/intro.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,11 @@ fn main() {
359359
// Take the lock, along with exclusive access to the underlying array
360360
let mut numbers = numbers_lock.lock();
361361
362-
// This is ugly for now, but will be replaced by
363-
// `numbers[num as uint] += 1` in the near future.
362+
// This is ugly for now because of the need for `get_mut`, but
363+
// will be replaced by `numbers[num as uint] += 1`
364+
// in the near future.
364365
// See: https://github.com/rust-lang/rust/issues/6515
365-
*numbers.get_mut(num as uint) = *numbers.get_mut(num as uint) + 1;
366+
*numbers.get_mut(num as uint) += 1;
366367
367368
println!("{}", (*numbers)[num as uint]);
368369

branches/auto/src/doc/rust.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ production. See [tokens](#tokens) for more information.
112112

113113
## Input format
114114

115-
Rust input is interpreted as a sequence of Unicode codepoints encoded in UTF-8.
115+
Rust input is interpreted as a sequence of Unicode codepoints encoded in UTF-8,
116+
normalized to Unicode normalization form NFKC.
116117
Most Rust grammar rules are defined in terms of printable ASCII-range codepoints,
117118
but a small number are defined in terms of Unicode properties or explicit
118119
codepoint lists. [^inputformat]

branches/auto/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ and may not be overridden:
21962196
Types are sendable
21972197
unless they contain references.
21982198

2199-
* `Share` - Types that are *threadsafe*.
2199+
* `Share` - Types that are *threadsafe*
22002200
These are types that are safe to be used across several threads with access to
22012201
a `&T` pointer. `Mutex<T>` is an example of a *sharable* type with internal mutable data.
22022202

branches/auto/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<style id="number" _name="Number" map-to="def:number"/>
2323
<style id="scope" _name="Scope" map-to="def:preprocessor"/>
2424
<style id="attribute" _name="Attribute" map-to="def:preprocessor"/>
25-
<style id="macro" _name="Macro" map-to="def:preprocessor"/>
2625
</styles>
2726

2827
<definitions>
@@ -252,12 +251,6 @@
252251
</match>
253252
</context>
254253

255-
<context id="macro" style-ref="macro">
256-
<match extended="true">
257-
\%{ident}!
258-
</match>
259-
</context>
260-
261254
<context id="lifetime" style-ref="keyword">
262255
<match extended="true">
263256
'\%{ident}
@@ -315,7 +308,6 @@
315308
<context ref="types"/>
316309
<context ref="ctypes"/>
317310
<context ref="self"/>
318-
<context ref="macro"/>
319311
<context ref="constants"/>
320312
<context ref="cconstants"/>
321313
<context ref="line-comment"/>

branches/auto/src/etc/unicode.py

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -464,26 +464,13 @@ def emit_charwidth_module(f, width_table):
464464
pfun=lambda x: "(%s,%s,%s,%s)" % (escape_char(x[0]), escape_char(x[1]), x[2], x[3]))
465465
f.write("}\n\n")
466466

467-
def emit_norm_module(f, canon, compat, combine, norm_props):
467+
def emit_norm_module(f, canon, compat, combine):
468468
canon_keys = canon.keys()
469469
canon_keys.sort()
470470

471471
compat_keys = compat.keys()
472472
compat_keys.sort()
473473

474-
canon_comp = {}
475-
comp_exclusions = norm_props["Full_Composition_Exclusion"]
476-
for char in canon_keys:
477-
if True in map(lambda (lo, hi): lo <= char <= hi, comp_exclusions):
478-
continue
479-
decomp = canon[char]
480-
if len(decomp) == 2:
481-
if not canon_comp.has_key(decomp[0]):
482-
canon_comp[decomp[0]] = []
483-
canon_comp[decomp[0]].append( (decomp[1], char) )
484-
canon_comp_keys = canon_comp.keys()
485-
canon_comp_keys.sort()
486-
487474
f.write("pub mod normalization {\n")
488475

489476
def mkdata_fun(table):
@@ -507,22 +494,6 @@ def f(char):
507494
emit_table(f, "compatibility_table", compat_keys, "&'static [(char, &'static [char])]",
508495
pfun=mkdata_fun(compat))
509496

510-
def comp_pfun(char):
511-
data = "(%s,&[" % escape_char(char)
512-
canon_comp[char].sort(lambda x, y: x[0] - y[0])
513-
first = True
514-
for pair in canon_comp[char]:
515-
if not first:
516-
data += ","
517-
first = False
518-
data += "(%s,%s)" % (escape_char(pair[0]), escape_char(pair[1]))
519-
data += "])"
520-
return data
521-
522-
f.write(" // Canonical compositions\n")
523-
emit_table(f, "composition_table", canon_comp_keys,
524-
"&'static [(char, &'static [(char, char)])]", pfun=comp_pfun)
525-
526497
f.write("""
527498
fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
528499
use core::option::{Some, None};
@@ -608,8 +579,6 @@ def optimize_width_table(wtable):
608579
scripts = load_properties("Scripts.txt", [])
609580
props = load_properties("PropList.txt",
610581
["White_Space", "Join_Control", "Noncharacter_Code_Point"])
611-
norm_props = load_properties("DerivedNormalizationProps.txt",
612-
["Full_Composition_Exclusion"])
613582

614583
# grapheme cluster category from DerivedCoreProperties
615584
# the rest are defined below
@@ -643,7 +612,7 @@ def optimize_width_table(wtable):
643612
emit_regex_module(rf, allcats, perl_words)
644613

645614
# normalizations and conversions module
646-
emit_norm_module(rf, canon_decomp, compat_decomp, combines, norm_props)
615+
emit_norm_module(rf, canon_decomp, compat_decomp, combines)
647616
emit_conversions_module(rf, lowerupper, upperlower)
648617

649618
### character width module

branches/auto/src/liballoc/heap.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ mod imp {
136136
use libc::{c_char, c_int, c_void, size_t};
137137

138138
#[link(name = "jemalloc", kind = "static")]
139-
#[cfg(not(test))]
140-
extern {}
141-
142139
extern {
143140
fn je_mallocx(size: size_t, flags: c_int) -> *mut c_void;
144141
fn je_rallocx(ptr: *mut c_void, size: size_t,

0 commit comments

Comments
 (0)