Skip to content

Commit 3460e5e

Browse files
committed
---
yaml --- r: 163198 b: refs/heads/snap-stage3 c: 52edb2e h: refs/heads/master v: v3
1 parent c668b71 commit 3460e5e

File tree

59 files changed

+8404
-7725
lines changed

Some content is hidden

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

59 files changed

+8404
-7725
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: dea71432049312f1312b18e11213f43bffbe3f19
4+
refs/heads/snap-stage3: 52edb2ecc9530264dc75babe477fd75c64feac04
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/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
This is a preliminary version of the Rust compiler, libraries and tools.
2+
3+
Source layout:
4+
5+
| Path | Description |
6+
| ------------------- | --------------------------------------------------------- |
7+
| `librustc/` | The self-hosted compiler |
8+
| `liballoc/` | Rust's core allocation library |
9+
| `libcore/` | The Rust core library |
10+
| `libdebug/` | Debugging utilities |
11+
| `libstd/` | The standard library (imported and linked by default) |
12+
| `libsyntax/` | The Rust parser and pretty-printer |
13+
| `libtest/` | Rust's test-runner code |
14+
| ------------------- | --------------------------------------------------------- |
15+
| `libarena/` | The arena (a fast but limited) memory allocator |
16+
| `libbacktrace/` | The libbacktrace library |
17+
| `libcollections/` | A collection of useful data structures and containers |
18+
| `libflate/` | Simple compression library |
19+
| `libfmt_macros/` | Macro support for format strings |
20+
| `libfourcc/` | Data format identifier library |
21+
| `libgetopts/` | Get command-line-options library |
22+
| `libglob/` | Unix glob patterns library |
23+
| `libgraphviz/` | Generating files for Graphviz |
24+
| `libhexfloat/` | Hexadecimal floating-point literals |
25+
| `liblibc/` | Bindings for the C standard library |
26+
| `liblog/` | Utilities for program-wide and customizable logging |
27+
| `libnum/` | Extended number support library (complex, rational, etc) |
28+
| `librand/` | Random numbers and distributions |
29+
| `libregex/` | Regular expressions |
30+
| `libregex_macros/` | The regex! syntax extension |
31+
| `libsemver/` | Rust's semantic versioning library |
32+
| `libserialize/` | Encode-Decode types library |
33+
| `libsync/` | Concurrency mechanisms and primitives |
34+
| `libterm/` | ANSI color library for terminals |
35+
| `libtime/` | Time operations library |
36+
| `liburl/` | URL handling lirary |
37+
| `libuuid/` | UUID's handling code |
38+
| ------------------- | --------------------------------------------------------- |
39+
| `rt/` | The runtime system |
40+
| `rt/rust_*.c` | - Some of the runtime services |
41+
| `rt/vg` | - Valgrind headers |
42+
| `rt/msvc` | - MSVC support |
43+
| `rt/sundown` | - The Markdown library used by rustdoc |
44+
| ------------------- | --------------------------------------------------------- |
45+
| `compiletest/` | The test runner |
46+
| `test/` | Testsuite |
47+
| `test/codegen` | - Tests for the LLVM IR infrastructure |
48+
| `test/compile-fail` | - Tests that should fail to compile |
49+
| `test/debug-info` | - Tests for the `debuginfo` tool |
50+
| `test/run-fail` | - Tests that should compile, run and fail |
51+
| `test/run-make` | - Tests that depend on a Makefile infrastructure |
52+
| `test/run-pass` | - Tests that should compile, run and succeed |
53+
| `test/bench` | - Benchmarks and miscellaneous |
54+
| `test/pretty` | - Pretty-printer tests |
55+
| `test/auxiliary` | - Dependencies of tests |
56+
| ------------------- | --------------------------------------------------------- |
57+
| `librustdoc/` | The Rust API documentation tool |
58+
| ------------------- | --------------------------------------------------------- |
59+
| `llvm/` | The LLVM submodule |
60+
| `rustllvm/` | LLVM support code |
61+
| ------------------- | --------------------------------------------------------- |
62+
| `etc/` | Scripts, editors support, misc |
63+
64+
65+
NOTE: This list (especially the second part of the table which contains modules and libraries)
66+
is highly volatile and subject to change.

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-
//! # 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)