Skip to content

Commit 4b39613

Browse files
committed
---
yaml --- r: 163231 b: refs/heads/snap-stage3 c: de64f85 h: refs/heads/master i: 163229: 14c7085 163227: 97aa429 163223: 09f4120 163215: 3869e0f 163199: 0f3924e v: v3
1 parent 683b79e commit 4b39613

File tree

139 files changed

+12865
-9456
lines changed

Some content is hidden

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

139 files changed

+12865
-9456
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: 4a46f5ebde5ab6a9a219f8b99eafefb61de2286a
4+
refs/heads/snap-stage3: de64f85c6ec8296e68d859a07ea179d3e69eeeb4
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ PKG_FILES := \
4848
$(S)configure $(S)Makefile.in \
4949
$(S)man \
5050
$(addprefix $(S)src/, \
51-
README.md \
5251
compiletest \
5352
doc \
5453
driver \

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

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

285285
def escape_char(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
286+
return "'\\u{%x}'" % c
291287

292288
def emit_bsearch_range_table(f):
293289
f.write("""
@@ -377,8 +373,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
377373
else if key < c { Less }
378374
else { Greater }
379375
}) {
380-
slice::Found(i) => Some(i),
381-
slice::NotFound(_) => None,
376+
slice::BinarySearchResult::Found(i) => Some(i),
377+
slice::BinarySearchResult::NotFound(_) => None,
382378
}
383379
}
384380
@@ -392,6 +388,7 @@ def emit_conversions_module(f, lowerupper, upperlower):
392388
def emit_grapheme_module(f, grapheme_table, grapheme_cats):
393389
f.write("""pub mod grapheme {
394390
use core::slice::SlicePrelude;
391+
use core::kinds::Copy;
395392
pub use self::GraphemeCat::*;
396393
use core::slice;
397394
@@ -403,18 +400,20 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
403400
f.write(" GC_" + cat + ",\n")
404401
f.write(""" }
405402
403+
impl Copy for GraphemeCat {}
404+
406405
fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
407406
use core::cmp::Ordering::{Equal, Less, Greater};
408407
match r.binary_search(|&(lo, hi, _)| {
409408
if lo <= c && c <= hi { Equal }
410409
else if hi < c { Less }
411410
else { Greater }
412411
}) {
413-
slice::Found(idx) => {
412+
slice::BinarySearchResult::Found(idx) => {
414413
let (_, _, cat) = r[idx];
415414
cat
416415
}
417-
slice::NotFound(_) => GC_Any
416+
slice::BinarySearchResult::NotFound(_) => GC_Any
418417
}
419418
}
420419
@@ -443,11 +442,11 @@ def emit_charwidth_module(f, width_table):
443442
else if hi < c { Less }
444443
else { Greater }
445444
}) {
446-
slice::Found(idx) => {
445+
slice::BinarySearchResult::Found(idx) => {
447446
let (_, _, r_ncjk, r_cjk) = r[idx];
448447
if is_cjk { r_cjk } else { r_ncjk }
449448
}
450-
slice::NotFound(_) => 1
449+
slice::BinarySearchResult::NotFound(_) => 1
451450
}
452451
}
453452
""")
@@ -540,11 +539,11 @@ def comp_pfun(char):
540539
else if hi < c { Less }
541540
else { Greater }
542541
}) {
543-
slice::Found(idx) => {
542+
slice::BinarySearchResult::Found(idx) => {
544543
let (_, _, result) = r[idx];
545544
result
546545
}
547-
slice::NotFound(_) => 0
546+
slice::BinarySearchResult::NotFound(_) => 0
548547
}
549548
}\n
550549
""")
@@ -613,7 +612,7 @@ def optimize_width_table(wtable):
613612
unicode_version = re.search(pattern, readme.read()).groups()
614613
rf.write("""
615614
/// The version of [Unicode](http://www.unicode.org/)
616-
/// that the `UnicodeChar` and `UnicodeStrSlice` traits are based on.
615+
/// that the `UnicodeChar` and `UnicodeStrPrelude` traits are based on.
617616
pub const UNICODE_VERSION: (uint, uint, uint) = (%s, %s, %s);
618617
""" % unicode_version)
619618
(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-
//! # Example
18+
//! # Examples
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-
/// # Example
183+
/// # Examples
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-
/// # Example
197+
/// # Examples
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-
/// # Example
211+
/// # Examples
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-
/// # Example
230+
/// # Examples
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-
/// # Example
250+
/// # Examples
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-
/// # Example
269+
/// # Examples
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-
/// # Example
289+
/// # Examples
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-
/// # Example
311+
/// # Examples
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-
/// # Example
330+
/// # Examples
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-
/// # Example
353+
/// # Examples
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-
/// # Example
380+
/// # Examples
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-
/// # Example
403+
/// # Examples
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-
/// # Example
429+
/// # Examples
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-
/// # Example
455+
/// # Examples
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-
/// # Example
473+
/// # Examples
474474
///
475475
/// ```
476476
/// use std::collections::BinaryHeap;

0 commit comments

Comments
 (0)