Skip to content

Commit d61814f

Browse files
committed
---
yaml --- r: 107438 b: refs/heads/dist-snap c: 4098327 h: refs/heads/master v: v3
1 parent a3fd640 commit d61814f

Some content is hidden

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

94 files changed

+1382
-1017
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: b520c2f28002db0e4120797d823380914871bac4
9+
refs/heads/dist-snap: 4098327b1fe1112ddf661b587be9eeec1d80adde
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ DRIVER_CRATE := $(S)src/driver/driver.rs
371371
LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit \
372372
interpreter instrumentation
373373

374+
# Only build these LLVM tools
375+
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt
376+
374377
define DEF_LLVM_VARS
375378
# The configure script defines these variables with the target triples
376379
# separated by Z. This defines new ones with the expected format.

branches/dist-snap/doc/index.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,54 @@
44
<style type="text/css">
55
#TOC { display: none; }
66
.header-section-number { display: none; }
7+
li {list-style-type: none; }
78
</style>
89

9-
[The Rust tutorial](tutorial.html) ([PDF](tutorial.pdf))
10-
[The Rust reference manual](rust.html) ([PDF](rust.pdf))
10+
* [The Rust tutorial](tutorial.html) (* [PDF](tutorial.pdf))
11+
* [The Rust reference manual](rust.html) (* [PDF](rust.pdf))
1112

1213
# Guides
1314

14-
[Pointers](guide-pointers.html)
15-
[References and Lifetimes](guide-lifetimes.html)
16-
[Containers and Iterators](guide-container.html)
17-
[Tasks and Communication](guide-tasks.html)
18-
[Foreign Function Interface](guide-ffi.html)
19-
[Macros](guide-macros.html)
20-
[Packaging](guide-rustpkg.html)
21-
[Testing](guide-testing.html)
22-
[Conditions](guide-conditions.html)
23-
[Rust's Runtime](guide-runtime.html)
15+
* [Pointers](guide-pointers.html)
16+
* [References and Lifetimes](guide-lifetimes.html)
17+
* [Containers and Iterators](guide-container.html)
18+
* [Tasks and Communication](guide-tasks.html)
19+
* [Foreign Function Interface](guide-ffi.html)
20+
* [Macros](guide-macros.html)
21+
* [Packaging](guide-rustpkg.html)
22+
* [Testing](guide-testing.html)
23+
* [Conditions](guide-conditions.html)
24+
* [Rust's Runtime](guide-runtime.html)
2425

2526
# Libraries
2627

27-
[The standard library, `libstd`](std/index.html)
28-
[The extra library, `libextra`](extra/index.html)
28+
* [The standard library, `libstd`](std/index.html)
29+
* [The extra library, `libextra`](extra/index.html)
2930

30-
[The M:N runtime library, `libgreen`](green/index.html)
31-
[The 1:1 runtime library, `libnative`](native/index.html)
31+
* [The M:N runtime library, `libgreen`](green/index.html)
32+
* [The 1:1 runtime library, `libnative`](native/index.html)
3233

33-
[The Rust libuv library, `librustuv`](rustuv/index.html)
34-
[The Rust packaging library, `librustpkg`](rustpkg/index.html)
34+
* [The Rust libuv library, `librustuv`](rustuv/index.html)
35+
* [The Rust packaging library, `librustpkg`](rustpkg/index.html)
3536

36-
[The Rust parser, `libsyntax`](syntax/index.html)
37-
[The Rust compiler, `librustc`](rustc/index.html)
37+
* [The Rust parser, `libsyntax`](syntax/index.html)
38+
* [The Rust compiler, `librustc`](rustc/index.html)
3839

3940
# Tooling
4041

41-
[The `rustpkg` manual](rustpkg.html)
42+
* [The `rustdoc` manual](rustdoc.html)
43+
* [The `rustpkg` manual](rustpkg.html)
4244

4345
# FAQs
4446

45-
[Language FAQ](complement-lang-faq.html)
46-
[Project FAQ](complement-project-faq.html)
47-
[Usage FAQ](complement-usage-faq.html)
48-
[Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
49-
[How to submit a bug report](complement-bugreport.html)
47+
* [Language FAQ](complement-lang-faq.html)
48+
* [Project FAQ](complement-project-faq.html)
49+
* [Usage FAQ](complement-usage-faq.html)
50+
* [Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
51+
* [How to submit a bug report](complement-bugreport.html)
5052

5153
# External resources
5254

53-
The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
54-
The Rust community on [Reddit](http://reddit.com/r/rust)
55-
The Rust [wiki](http://github.com/mozilla/rust/wiki)
55+
* The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
56+
* The Rust community on [Reddit](http://reddit.com/r/rust)
57+
* The Rust [wiki](http://github.com/mozilla/rust/wiki)

branches/dist-snap/doc/rust.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ path_glob : ident [ "::" path_glob ] ?
806806

807807
A _use declaration_ creates one or more local name bindings synonymous
808808
with some other [path](#paths).
809-
Usually a `use` declaration is used to shorten the path required to refer to a module item.
809+
Usually a `use` declaration is used to shorten the path required to refer to a
810+
module item. These declarations may appear at the top of [modules](#modules) and
811+
[blocks](#blocks).
810812

811813
*Note*: Unlike in many languages,
812814
`use` declarations in Rust do *not* declare linkage dependency with external crates.
@@ -2318,14 +2320,24 @@ let base = Point3d {x: 1, y: 2, z: 3};
23182320
Point3d {y: 0, z: 10, .. base};
23192321
~~~~
23202322

2321-
### Record expressions
2323+
### Block expressions
23222324

23232325
~~~~ {.ebnf .gram}
2324-
rec_expr : '{' ident ':' expr
2325-
[ ',' ident ':' expr ] *
2326-
[ ".." expr ] '}'
2326+
block_expr : '{' [ view_item ] *
2327+
[ stmt ';' | item ] *
2328+
[ expr ] '}'
23272329
~~~~
23282330

2331+
A _block expression_ is similar to a module in terms of the declarations that
2332+
are possible. Each block conceptually introduces a new namespace scope. View
2333+
items can bring new names into scopes and declared items are in scope for only
2334+
the block itself.
2335+
2336+
A block will execute each statement sequentially, and then execute the
2337+
expression (if given). If the final expression is omitted, the type and return
2338+
value of the block are `()`, but if it is provided, the type and return value
2339+
of the block are that of the expression itself.
2340+
23292341
### Method-call expressions
23302342

23312343
~~~~ {.ebnf .gram}

branches/dist-snap/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1)) ONLY_TOOLS="$$(LLVM_TOOLS)"
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/dist-snap/src/compiletest/header.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,14 @@ pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
9090
fn xfail_target(config: &config) -> ~str {
9191
~"xfail-" + util::get_os(config.target)
9292
}
93+
fn xfail_stage(config: &config) -> ~str {
94+
~"xfail-" + config.stage_id.split('-').next().unwrap()
95+
}
9396
9497
let val = iter_header(testfile, |ln| {
9598
if parse_name_directive(ln, "xfail-test") { false }
9699
else if parse_name_directive(ln, xfail_target(config)) { false }
100+
else if parse_name_directive(ln, xfail_stage(config)) { false }
97101
else if config.mode == common::mode_pretty &&
98102
parse_name_directive(ln, "xfail-pretty") { false }
99103
else { true }

branches/dist-snap/src/etc/check-summary.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,30 @@
77
summaries = []
88
def summarise(fname):
99
summary = {}
10-
fd = open(fname)
11-
for line in fd:
12-
status, test = line.strip().split(' ', 1)
13-
if not summary.has_key(status):
14-
summary[status] = []
15-
summary[status].append(test)
16-
summaries.append((fname, summary))
10+
with open(fname) as fd:
11+
for line in fd:
12+
splitline = line.strip().split(' ')
13+
if len(splitline) == 1:
14+
continue
15+
status = splitline[0]
16+
test = splitline[-1]
17+
# track bench runs
18+
if splitline[1] == 'ns/iter':
19+
status = 'bench'
20+
if not summary.has_key(status):
21+
summary[status] = []
22+
summary[status].append(test)
23+
summaries.append((fname, summary))
1724
def count(t):
1825
return sum(map(lambda (f, s): len(s.get(t, [])), summaries))
1926
logfiles = sys.argv[1:]
2027
map(summarise, logfiles)
2128
ok = count('ok')
2229
failed = count('failed')
2330
ignored = count('ignored')
24-
print "summary of %d test runs: %d passed; %d failed; %d ignored" % \
25-
(len(logfiles), ok, failed, ignored)
31+
measured = count('bench')
32+
print "summary of %d test runs: %d passed; %d failed; %d ignored; %d measured" % \
33+
(len(logfiles), ok, failed, ignored, measured)
2634
print ""
2735
if failed > 0:
2836
print "failed tests:"

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
8383
syn keyword rustTrait Times
8484

8585
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
86-
syn keyword rustTrait Bitwise BitCount Bounded
87-
syn keyword rustTrait Integer Fractional Real RealExt
86+
syn keyword rustTrait Bitwise Bounded Integer Fractional Real RealExt
8887
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
8988
syn keyword rustTrait Orderable Signed Unsigned Round
9089
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive

branches/dist-snap/src/libextra/base64.rs

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,25 @@ impl<'a> ToBase64 for &'a [u8] {
154154
pub trait FromBase64 {
155155
/// Converts the value of `self`, interpreted as base64 encoded data, into
156156
/// an owned vector of bytes, returning the vector.
157-
fn from_base64(&self) -> Result<~[u8], ~str>;
157+
fn from_base64(&self) -> Result<~[u8], FromBase64Error>;
158+
}
159+
160+
/// Errors that can occur when decoding a base64 encoded string
161+
pub enum FromBase64Error {
162+
/// The input contained a character not part of the base64 format
163+
InvalidBase64Character(char, uint),
164+
/// The input had an invalid length
165+
InvalidBase64Length,
166+
}
167+
168+
impl ToStr for FromBase64Error {
169+
fn to_str(&self) -> ~str {
170+
match *self {
171+
InvalidBase64Character(ch, idx) =>
172+
format!("Invalid character '{}' at position {}", ch, idx),
173+
InvalidBase64Length => ~"Invalid length",
174+
}
175+
}
158176
}
159177

160178
impl<'a> FromBase64 for &'a str {
@@ -188,7 +206,7 @@ impl<'a> FromBase64 for &'a str {
188206
* }
189207
* ```
190208
*/
191-
fn from_base64(&self) -> Result<~[u8], ~str> {
209+
fn from_base64(&self) -> Result<~[u8], FromBase64Error> {
192210
let mut r = ~[];
193211
let mut buf: u32 = 0;
194212
let mut modulus = 0;
@@ -205,8 +223,7 @@ impl<'a> FromBase64 for &'a str {
205223
'/'|'_' => buf |= 0x3F,
206224
'\r'|'\n' => continue,
207225
'=' => break,
208-
_ => return Err(format!("Invalid character '{}' at position {}",
209-
self.char_at(idx), idx))
226+
_ => return Err(InvalidBase64Character(self.char_at(idx), idx)),
210227
}
211228

212229
buf <<= 6;
@@ -221,8 +238,7 @@ impl<'a> FromBase64 for &'a str {
221238

222239
for (idx, byte) in it {
223240
if (byte as char) != '=' {
224-
return Err(format!("Invalid character '{}' at position {}",
225-
self.char_at(idx), idx));
241+
return Err(InvalidBase64Character(self.char_at(idx), idx));
226242
}
227243
}
228244

@@ -235,7 +251,7 @@ impl<'a> FromBase64 for &'a str {
235251
r.push((buf >> 8 ) as u8);
236252
}
237253
0 => (),
238-
_ => return Err(~"Invalid Base64 length")
254+
_ => return Err(InvalidBase64Length),
239255
}
240256

241257
Ok(r)

branches/dist-snap/src/libextra/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ mod test {
127127
// Rendezvous streams should be able to handle any number of messages being sent
128128
let (port, chan) = rendezvous();
129129
do spawn {
130-
1000000.times(|| { chan.send(()) })
130+
10000.times(|| { chan.send(()) })
131131
}
132-
1000000.times(|| { port.recv() })
132+
10000.times(|| { port.recv() })
133133
}
134134

135135
#[test]

0 commit comments

Comments
 (0)