Skip to content

Commit 00569c0

Browse files
committed
---
yaml --- r: 154075 b: refs/heads/try2 c: 806e4f0 h: refs/heads/master i: 154073: 3dd06ea 154071: 1c098b9 v: v3
1 parent 72858d8 commit 00569c0

File tree

37 files changed

+196
-1037
lines changed

37 files changed

+196
-1037
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 157459be59da13081737c92c085de3d3fe5bbbea
8+
refs/heads/try2: 806e4f0b14d45cdb2c5d585d1a201c490b9db96a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/guide.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,10 @@ Check out the generated `Cargo.toml`:
16261626
name = "guessing_game"
16271627
version = "0.1.0"
16281628
authors = ["Your Name <[email protected]>"]
1629+
1630+
[[bin]]
1631+
1632+
name = "guessing_game"
16291633
```
16301634

16311635
Cargo gets this information from your environment. If it's not correct, go ahead
@@ -2565,9 +2569,9 @@ It gives an error:
25652569

25662570
```{notrust,ignore}
25672571
Compiling modules v0.1.0 (file:/home/you/projects/modules)
2568-
src/main.rs:2:5: 2:23 error: function `print_hello` is private
2569-
src/main.rs:2 hello::print_hello();
2570-
^~~~~~~~~~~~~~~~~~
2572+
src/modules.rs:2:5: 2:23 error: function `print_hello` is private
2573+
src/modules.rs:2 hello::print_hello();
2574+
^~~~~~~~~~~~~~~~~~
25712575
```
25722576

25732577
To make it public, we use the `pub` keyword:

branches/try2/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/try2/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
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"/>
2526
</styles>
2627

2728
<definitions>
@@ -251,6 +252,12 @@
251252
</match>
252253
</context>
253254

255+
<context id="macro" style-ref="macro">
256+
<match extended="true">
257+
\%{ident}!
258+
</match>
259+
</context>
260+
254261
<context id="lifetime" style-ref="keyword">
255262
<match extended="true">
256263
'\%{ident}
@@ -308,6 +315,7 @@
308315
<context ref="types"/>
309316
<context ref="ctypes"/>
310317
<context ref="self"/>
318+
<context ref="macro"/>
311319
<context ref="constants"/>
312320
<context ref="cconstants"/>
313321
<context ref="line-comment"/>

branches/try2/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/try2/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)