Skip to content

Commit 683b79e

Browse files
committed
---
yaml --- r: 163230 b: refs/heads/snap-stage3 c: 4a46f5e h: refs/heads/master v: v3
1 parent 14c7085 commit 683b79e

File tree

142 files changed

+9464
-12874
lines changed

Some content is hidden

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

142 files changed

+9464
-12874
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2d90b91b5d2d18cd433a9e6f1944b685f8b4bb04
4+
refs/heads/snap-stage3: 4a46f5ebde5ab6a9a219f8b99eafefb61de2286a
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ PKG_FILES := \
4848
$(S)configure $(S)Makefile.in \
4949
$(S)man \
5050
$(addprefix $(S)src/, \
51+
README.md \
5152
compiletest \
5253
doc \
5354
driver \

branches/snap-stage3/src/etc/unicode.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ def load_east_asian_width(want_widths, except_cats):
283283
return widths
284284

285285
def escape_char(c):
286-
return "'\\u{%x}'" % c
286+
if c <= 0x7f:
287+
return "'\\x%2.2x'" % c
288+
if c <= 0xffff:
289+
return "'\\u%4.4x'" % c
290+
return "'\\U%8.8x'" % c
287291

288292
def emit_bsearch_range_table(f):
289293
f.write("""
@@ -373,8 +377,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
373377
else if key < c { Less }
374378
else { Greater }
375379
}) {
376-
slice::BinarySearchResult::Found(i) => Some(i),
377-
slice::BinarySearchResult::NotFound(_) => None,
380+
slice::Found(i) => Some(i),
381+
slice::NotFound(_) => None,
378382
}
379383
}
380384
@@ -388,7 +392,6 @@ def emit_conversions_module(f, lowerupper, upperlower):
388392
def emit_grapheme_module(f, grapheme_table, grapheme_cats):
389393
f.write("""pub mod grapheme {
390394
use core::slice::SlicePrelude;
391-
use core::kinds::Copy;
392395
pub use self::GraphemeCat::*;
393396
use core::slice;
394397
@@ -400,20 +403,18 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
400403
f.write(" GC_" + cat + ",\n")
401404
f.write(""" }
402405
403-
impl Copy for GraphemeCat {}
404-
405406
fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
406407
use core::cmp::Ordering::{Equal, Less, Greater};
407408
match r.binary_search(|&(lo, hi, _)| {
408409
if lo <= c && c <= hi { Equal }
409410
else if hi < c { Less }
410411
else { Greater }
411412
}) {
412-
slice::BinarySearchResult::Found(idx) => {
413+
slice::Found(idx) => {
413414
let (_, _, cat) = r[idx];
414415
cat
415416
}
416-
slice::BinarySearchResult::NotFound(_) => GC_Any
417+
slice::NotFound(_) => GC_Any
417418
}
418419
}
419420
@@ -442,11 +443,11 @@ def emit_charwidth_module(f, width_table):
442443
else if hi < c { Less }
443444
else { Greater }
444445
}) {
445-
slice::BinarySearchResult::Found(idx) => {
446+
slice::Found(idx) => {
446447
let (_, _, r_ncjk, r_cjk) = r[idx];
447448
if is_cjk { r_cjk } else { r_ncjk }
448449
}
449-
slice::BinarySearchResult::NotFound(_) => 1
450+
slice::NotFound(_) => 1
450451
}
451452
}
452453
""")
@@ -539,11 +540,11 @@ def comp_pfun(char):
539540
else if hi < c { Less }
540541
else { Greater }
541542
}) {
542-
slice::BinarySearchResult::Found(idx) => {
543+
slice::Found(idx) => {
543544
let (_, _, result) = r[idx];
544545
result
545546
}
546-
slice::BinarySearchResult::NotFound(_) => 0
547+
slice::NotFound(_) => 0
547548
}
548549
}\n
549550
""")
@@ -612,7 +613,7 @@ def optimize_width_table(wtable):
612613
unicode_version = re.search(pattern, readme.read()).groups()
613614
rf.write("""
614615
/// The version of [Unicode](http://www.unicode.org/)
615-
/// that the `UnicodeChar` and `UnicodeStrPrelude` traits are based on.
616+
/// that the `UnicodeChar` and `UnicodeStrSlice` traits are based on.
616617
pub const UNICODE_VERSION: (uint, uint, uint) = (%s, %s, %s);
617618
""" % unicode_version)
618619
(canon_decomp, compat_decomp, gencats, combines,

branches/snap-stage3/src/libcollections/binary_heap.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
1616
//! be used for an `O(n log n)` in-place heapsort.
1717
//!
18-
//! # Examples
18+
//! # Example
1919
//!
2020
//! This is a larger example which implements [Dijkstra's algorithm][dijkstra]
2121
//! to solve the [shortest path problem][sssp] on a [directed graph][dir_graph].
@@ -180,7 +180,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
180180
impl<T: Ord> BinaryHeap<T> {
181181
/// Creates an empty `BinaryHeap` as a max-heap.
182182
///
183-
/// # Examples
183+
/// # Example
184184
///
185185
/// ```
186186
/// use std::collections::BinaryHeap;
@@ -194,7 +194,7 @@ impl<T: Ord> BinaryHeap<T> {
194194
/// so that the `BinaryHeap` does not have to be reallocated
195195
/// until it contains at least that many values.
196196
///
197-
/// # Examples
197+
/// # Example
198198
///
199199
/// ```
200200
/// use std::collections::BinaryHeap;
@@ -208,7 +208,7 @@ impl<T: Ord> BinaryHeap<T> {
208208
/// Creates a `BinaryHeap` from a vector. This is sometimes called
209209
/// `heapifying` the vector.
210210
///
211-
/// # Examples
211+
/// # Example
212212
///
213213
/// ```
214214
/// use std::collections::BinaryHeap;
@@ -227,7 +227,7 @@ impl<T: Ord> BinaryHeap<T> {
227227
/// An iterator visiting all values in underlying vector, in
228228
/// arbitrary order.
229229
///
230-
/// # Examples
230+
/// # Example
231231
///
232232
/// ```
233233
/// use std::collections::BinaryHeap;
@@ -247,7 +247,7 @@ impl<T: Ord> BinaryHeap<T> {
247247
/// the binary heap in arbitrary order. The binary heap cannot be used
248248
/// after calling this.
249249
///
250-
/// # Examples
250+
/// # Example
251251
///
252252
/// ```
253253
/// use std::collections::BinaryHeap;
@@ -266,7 +266,7 @@ impl<T: Ord> BinaryHeap<T> {
266266

267267
/// Returns the greatest item in a queue, or `None` if it is empty.
268268
///
269-
/// # Examples
269+
/// # Example
270270
///
271271
/// ```
272272
/// use std::collections::BinaryHeap;
@@ -286,7 +286,7 @@ impl<T: Ord> BinaryHeap<T> {
286286

287287
/// Returns the number of elements the queue can hold without reallocating.
288288
///
289-
/// # Examples
289+
/// # Example
290290
///
291291
/// ```
292292
/// use std::collections::BinaryHeap;
@@ -308,7 +308,7 @@ impl<T: Ord> BinaryHeap<T> {
308308
///
309309
/// Panics if the new capacity overflows `uint`.
310310
///
311-
/// # Examples
311+
/// # Example
312312
///
313313
/// ```
314314
/// use std::collections::BinaryHeap;
@@ -327,7 +327,7 @@ impl<T: Ord> BinaryHeap<T> {
327327
///
328328
/// Panics if the new capacity overflows `uint`.
329329
///
330-
/// # Examples
330+
/// # Example
331331
///
332332
/// ```
333333
/// use std::collections::BinaryHeap;
@@ -350,7 +350,7 @@ impl<T: Ord> BinaryHeap<T> {
350350
/// Removes the greatest item from a queue and returns it, or `None` if it
351351
/// is empty.
352352
///
353-
/// # Examples
353+
/// # Example
354354
///
355355
/// ```
356356
/// use std::collections::BinaryHeap;
@@ -377,7 +377,7 @@ impl<T: Ord> BinaryHeap<T> {
377377

378378
/// Pushes an item onto the queue.
379379
///
380-
/// # Examples
380+
/// # Example
381381
///
382382
/// ```
383383
/// use std::collections::BinaryHeap;
@@ -400,7 +400,7 @@ impl<T: Ord> BinaryHeap<T> {
400400
/// Pushes an item onto a queue then pops the greatest item off the queue in
401401
/// an optimized fashion.
402402
///
403-
/// # Examples
403+
/// # Example
404404
///
405405
/// ```
406406
/// use std::collections::BinaryHeap;
@@ -426,7 +426,7 @@ impl<T: Ord> BinaryHeap<T> {
426426
/// an optimized fashion. The push is done regardless of whether the queue
427427
/// was empty.
428428
///
429-
/// # Examples
429+
/// # Example
430430
///
431431
/// ```
432432
/// use std::collections::BinaryHeap;
@@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
452452
/// Consumes the `BinaryHeap` and returns the underlying vector
453453
/// in arbitrary order.
454454
///
455-
/// # Examples
455+
/// # Example
456456
///
457457
/// ```
458458
/// use std::collections::BinaryHeap;
@@ -470,7 +470,7 @@ impl<T: Ord> BinaryHeap<T> {
470470
/// Consumes the `BinaryHeap` and returns a vector in sorted
471471
/// (ascending) order.
472472
///
473-
/// # Examples
473+
/// # Example
474474
///
475475
/// ```
476476
/// use std::collections::BinaryHeap;

0 commit comments

Comments
 (0)