Skip to content

Commit 6384e93

Browse files
committed
---
yaml --- r: 107648 b: refs/heads/dist-snap c: b0ef2d5 h: refs/heads/master v: v3
1 parent 5eca07d commit 6384e93

Some content is hidden

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

78 files changed

+1386
-1461
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: 35e26e94d8a13ef3f24a66374aff815e370f8843
9+
refs/heads/dist-snap: b0ef2d56a8f33a139493f3b904b903693feb6118
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: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ endif
124124
ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127+
ifdef DISABLE_RPATH
128+
# NOTE: make this CFG_RUSTC_FLAGS after stage0 snapshot
129+
RUSTFLAGS_STAGE1 += --no-rpath
130+
RUSTFLAGS_STAGE2 += --no-rpath
131+
RUSTFLAGS_STAGE3 += --no-rpath
132+
endif
127133

128134
# The executables crated during this compilation process have no need to include
129135
# static copies of libstd and libextra. We also generate dynamic versions of all
@@ -367,7 +373,7 @@ LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit
367373
interpreter instrumentation
368374

369375
# Only build these LLVM tools
370-
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt
376+
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract
371377

372378
define DEF_LLVM_VARS
373379
# The configure script defines these variables with the target triples
@@ -541,8 +547,21 @@ CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
541547
endif
542548
endif
543549

550+
ifdef CFG_DISABLE_RPATH
551+
ifeq ($$(OSTYPE_$(3)),apple-darwin)
552+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
553+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
554+
else
555+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
556+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
557+
endif
558+
else
559+
RPATH_VAR$(1)_T_$(2)_H_$(3) :=
560+
endif
561+
544562
STAGE$(1)_T_$(2)_H_$(3) := \
545-
$$(Q)$$(call CFG_RUN_TARG_$(3),$(1), \
563+
$$(Q)$$(RPATH_VAR$(1)_T_$(2)_H_$(3)) \
564+
$$(call CFG_RUN_TARG_$(3),$(1), \
546565
$$(CFG_VALGRIND_COMPILE$(1)) \
547566
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
548567
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \

branches/dist-snap/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
382382
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
383383
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
384384
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
385+
opt rpath 1 "build rpaths into rustc itself"
385386
valopt prefix "/usr/local" "set installation prefix"
386387
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
387388
valopt llvm-root "" "set LLVM root"

branches/dist-snap/doc/guide-container.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ The `DoubleEndedIterator` trait represents an iterator able to yield elements
336336
from either end of a range. It inherits from the `Iterator` trait and extends
337337
it with the `next_back` function.
338338

339-
A `DoubleEndedIterator` can be flipped with the `invert` adaptor, returning
340-
another `DoubleEndedIterator` with `next` and `next_back` exchanged.
339+
A `DoubleEndedIterator` can have its direction changed with the `rev` adaptor,
340+
returning another `DoubleEndedIterator` with `next` and `next_back` exchanged.
341341

342342
~~~
343343
let xs = [1, 2, 3, 4, 5, 6];
@@ -347,7 +347,7 @@ println!("{:?}", it.next()); // prints `Some(&2)`
347347
println!("{:?}", it.next_back()); // prints `Some(&6)`
348348
349349
// prints `5`, `4` and `3`
350-
for &x in it.invert() {
350+
for &x in it.rev() {
351351
println!("{}", x)
352352
}
353353
~~~
@@ -366,7 +366,7 @@ let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
366366
println!("{:?}", it.next()); // prints `Some(2)`
367367
368368
// prints `16`, `14`, `12`, `10`, `8`, `6`, `4`
369-
for x in it.invert() {
369+
for x in it.rev() {
370370
println!("{}", x);
371371
}
372372
~~~

branches/dist-snap/doc/guide-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Some benefits of using libgreen are:
202202

203203
M:N threading is built upon the concept of a pool of M OS threads (which
204204
libgreen refers to as schedulers), able to run N Rust tasks. This abstraction is
205-
encompassed in libgreen's [`SchedPool`][schedpool] type. This type allows for
205+
encompassed in libgreen's [`SchedPool`](green/struct.SchedPool.html) type. This type allows for
206206
fine-grained control over the pool of schedulers which will be used to run Rust
207207
tasks.
208208

branches/dist-snap/doc/rust.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,7 @@ match_pat : pat [ ".." pat ] ? [ "if" expr ] ;
28652865
A `match` expression branches on a *pattern*. The exact form of matching that
28662866
occurs depends on the pattern. Patterns consist of some combination of
28672867
literals, destructured enum constructors, structures, records and tuples, variable binding
2868-
specifications, wildcards (`*`), and placeholders (`_`). A `match` expression has a *head
2868+
specifications, wildcards (`..`), and placeholders (`_`). A `match` expression has a *head
28692869
expression*, which is the value to compare to the patterns. The type of the
28702870
patterns must equal the type of the head expression.
28712871

@@ -2887,7 +2887,7 @@ match x {
28872887

28882888
The first pattern matches lists constructed by applying `Cons` to any head value, and a
28892889
tail value of `~Nil`. The second pattern matches _any_ list constructed with `Cons`,
2890-
ignoring the values of its arguments. The difference between `_` and `*` is that the pattern
2890+
ignoring the values of its arguments. The difference between `_` and `..` is that the pattern
28912891
`C(_)` is only type-correct if `C` has exactly one argument, while the pattern `C(..)` is
28922892
type-correct for any enum variant `C`, regardless of how many arguments `C` has.
28932893

@@ -2939,6 +2939,27 @@ This can be changed to bind to a reference by
29392939
using the `ref` keyword,
29402940
or to a mutable reference using `ref mut`.
29412941

2942+
Subpatterns can also be bound to variables by the use of the syntax
2943+
`variable @ pattern`.
2944+
For example:
2945+
2946+
~~~~
2947+
enum List { Nil, Cons(uint, ~List) }
2948+
2949+
fn is_sorted(list: &List) -> bool {
2950+
match *list {
2951+
Nil | Cons(_, ~Nil) => true,
2952+
Cons(x, ref r @ ~Cons(y, _)) => (x <= y) && is_sorted(*r)
2953+
}
2954+
}
2955+
2956+
fn main() {
2957+
let a = Cons(6, ~Cons(7, ~Cons(42, ~Nil)));
2958+
assert!(is_sorted(&a));
2959+
}
2960+
2961+
~~~~
2962+
29422963
Patterns can also dereference pointers by using the `&`,
29432964
`~` or `@` symbols, as appropriate. For example, these two matches
29442965
on `x: &int` are equivalent:

branches/dist-snap/doc/tutorial.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,16 @@ to the value of the matched value inside of the arm's action. Thus, `(0.0,
520520
y)` matches any tuple whose first element is zero, and binds `y` to
521521
the second element. `(x, y)` matches any two-element tuple, and binds both
522522
elements to variables.
523+
A subpattern can also be bound to a variable, using `variable @ pattern`. For
524+
example:
525+
526+
~~~~
527+
# let age = 23;
528+
match age {
529+
a @ 0..20 => println!("{} years old", a),
530+
_ => println!("older than 21")
531+
}
532+
~~~~
523533

524534
Any `match` arm can have a guard clause (written `if EXPR`), called a
525535
*pattern guard*, which is an expression of type `bool` that
@@ -1096,7 +1106,7 @@ let y = x.clone();
10961106
10971107
let z = x;
10981108
1099-
// and now, it can no longer be used since it has been moved from
1109+
// and now, it can no longer be used since it has been moved
11001110
~~~
11011111

11021112
The mutability of a value may be changed by moving it to a new owner:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# xfail-license
33

4+
import glob
45
import sys
56

67
if __name__ == '__main__':
@@ -24,7 +25,8 @@ def summarise(fname):
2425
def count(t):
2526
return sum(map(lambda (f, s): len(s.get(t, [])), summaries))
2627
logfiles = sys.argv[1:]
27-
map(summarise, logfiles)
28+
for files in map(glob.glob, logfiles):
29+
map(summarise, files)
2830
ok = count('ok')
2931
failed = count('failed')
3032
ignored = count('ignored')

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use std::cmp;
1515
use std::iter::RandomAccessIterator;
16-
use std::iter::{Invert, Enumerate, Repeat, Map, Zip};
16+
use std::iter::{Rev, Enumerate, Repeat, Map, Zip};
1717
use std::num;
1818
use std::ops;
1919
use std::uint;
@@ -387,7 +387,7 @@ impl Bitv {
387387
}
388388
}
389389

390-
/// Invert all bits
390+
/// Flip all bits
391391
#[inline]
392392
pub fn negate(&mut self) {
393393
match self.rep {
@@ -428,8 +428,8 @@ impl Bitv {
428428
}
429429

430430
#[inline]
431-
pub fn rev_iter<'a>(&'a self) -> Invert<Bits<'a>> {
432-
self.iter().invert()
431+
pub fn rev_iter<'a>(&'a self) -> Rev<Bits<'a>> {
432+
self.iter().rev()
433433
}
434434

435435
/// Returns `true` if all bits are 0

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use std::cast;
2626
use std::ptr;
2727
use std::util;
28-
use std::iter::Invert;
28+
use std::iter::Rev;
2929
use std::iter;
3030

3131
use container::Deque;
@@ -368,8 +368,8 @@ impl<T> DList<T> {
368368

369369
/// Provide a reverse iterator
370370
#[inline]
371-
pub fn rev_iter<'a>(&'a self) -> Invert<Items<'a, T>> {
372-
self.iter().invert()
371+
pub fn rev_iter<'a>(&'a self) -> Rev<Items<'a, T>> {
372+
self.iter().rev()
373373
}
374374

375375
/// Provide a forward iterator with mutable references
@@ -388,8 +388,8 @@ impl<T> DList<T> {
388388
}
389389
/// Provide a reverse iterator with mutable references
390390
#[inline]
391-
pub fn mut_rev_iter<'a>(&'a mut self) -> Invert<MutItems<'a, T>> {
392-
self.mut_iter().invert()
391+
pub fn mut_rev_iter<'a>(&'a mut self) -> Rev<MutItems<'a, T>> {
392+
self.mut_iter().rev()
393393
}
394394

395395

@@ -401,8 +401,8 @@ impl<T> DList<T> {
401401

402402
/// Consume the list into an iterator yielding elements by value, in reverse
403403
#[inline]
404-
pub fn move_rev_iter(self) -> Invert<MoveItems<T>> {
405-
self.move_iter().invert()
404+
pub fn move_rev_iter(self) -> Rev<MoveItems<T>> {
405+
self.move_iter().rev()
406406
}
407407
}
408408

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
use std::num;
1717
use std::vec;
18-
use std::iter::{Invert, RandomAccessIterator};
18+
use std::iter::{Rev, RandomAccessIterator};
1919

2020
use container::Deque;
2121

@@ -192,8 +192,8 @@ impl<T> RingBuf<T> {
192192
}
193193

194194
/// Back-to-front iterator.
195-
pub fn rev_iter<'a>(&'a self) -> Invert<Items<'a, T>> {
196-
self.iter().invert()
195+
pub fn rev_iter<'a>(&'a self) -> Rev<Items<'a, T>> {
196+
self.iter().rev()
197197
}
198198

199199
/// Front-to-back iterator which returns mutable values.
@@ -223,8 +223,8 @@ impl<T> RingBuf<T> {
223223
}
224224

225225
/// Back-to-front iterator which returns mutable values.
226-
pub fn mut_rev_iter<'a>(&'a mut self) -> Invert<MutItems<'a, T>> {
227-
self.mut_iter().invert()
226+
pub fn mut_rev_iter<'a>(&'a mut self) -> Rev<MutItems<'a, T>> {
227+
self.mut_iter().rev()
228228
}
229229
}
230230

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#[allow(missing_doc)];
1717

18-
use std::iter::{Enumerate, FilterMap, Invert};
18+
use std::iter::{Enumerate, FilterMap, Rev};
1919
use std::util::replace;
2020
use std::vec;
2121

@@ -140,14 +140,14 @@ impl<V> SmallIntMap<V> {
140140
/// An iterator visiting all key-value pairs in descending order by the keys.
141141
/// Iterator element type is (uint, &'r V)
142142
pub fn rev_iter<'r>(&'r self) -> RevEntries<'r, V> {
143-
self.iter().invert()
143+
self.iter().rev()
144144
}
145145

146146
/// An iterator visiting all key-value pairs in descending order by the keys,
147147
/// with mutable references to the values
148148
/// Iterator element type is (uint, &'r mut V)
149149
pub fn mut_rev_iter<'r>(&'r mut self) -> RevMutEntries <'r, V> {
150-
self.mut_iter().invert()
150+
self.mut_iter().rev()
151151
}
152152

153153
/// Empties the hash map, moving all values into the specified closure
@@ -241,7 +241,7 @@ pub struct Entries<'a, T> {
241241

242242
iterator!(impl Entries -> (uint, &'a T), get_ref)
243243
double_ended_iterator!(impl Entries -> (uint, &'a T), get_ref)
244-
pub type RevEntries<'a, T> = Invert<Entries<'a, T>>;
244+
pub type RevEntries<'a, T> = Rev<Entries<'a, T>>;
245245

246246
pub struct MutEntries<'a, T> {
247247
priv front: uint,
@@ -251,7 +251,7 @@ pub struct MutEntries<'a, T> {
251251

252252
iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
253253
double_ended_iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
254-
pub type RevMutEntries<'a, T> = Invert<MutEntries<'a, T>>;
254+
pub type RevMutEntries<'a, T> = Rev<MutEntries<'a, T>>;
255255

256256
#[cfg(test)]
257257
mod test_map {

0 commit comments

Comments
 (0)