Skip to content

Commit dbdb09a

Browse files
blake2-ppcthestinger
authored andcommitted
---
yaml --- r: 80927 b: refs/heads/snap-stage3 c: f0630fd h: refs/heads/master i: 80925: 9d9f85d 80923: f917edc 80919: afade18 80911: 272024a 80895: 383da1e v: v3
1 parent 71d09c8 commit dbdb09a

Some content is hidden

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

91 files changed

+2643
-3716
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: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 3c0013134cecbe9592f02ed5c6a94c06effb19d4
4+
refs/heads/snap-stage3: f0630fdc8bd10a40c988e295482882aa5fce207e
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ string_body : non_double_quote
248248
| '\x5c' [ '\x22' | common_escape ] ;
249249
250250
common_escape : '\x5c'
251-
| 'n' | 'r' | 't' | '0'
251+
| 'n' | 'r' | 't'
252252
| 'x' hex_digit 2
253253
| 'u' hex_digit 4
254254
| 'U' hex_digit 8 ;

branches/snap-stage3/doc/tutorial-container.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
The container traits are defined in the `std::container` module.
66

7-
## Unique and managed vectors
7+
## Unique vectors
88

9-
Vectors have `O(1)` indexing and removal from the end, along with `O(1)`
10-
amortized insertion. Vectors are the most common container in Rust, and are
11-
flexible enough to fit many use cases.
9+
Vectors have `O(1)` indexing, push (to the end) and pop (from the end). Vectors
10+
are the most common container in Rust, and are flexible enough to fit many use
11+
cases.
1212

1313
Vectors can also be sorted and used as efficient lookup tables with the
14-
`std::vec::bsearch` function, if all the elements are inserted at one time and
14+
`bsearch()` method, if all the elements are inserted at one time and
1515
deletions are unnecessary.
1616

1717
## Maps and sets
@@ -42,10 +42,15 @@ implementing the `IterBytes` trait.
4242

4343
## Double-ended queues
4444

45-
The `extra::deque` module implements a double-ended queue with `O(1)` amortized
46-
inserts and removals from both ends of the container. It also has `O(1)`
47-
indexing like a vector. The contained elements are not required to be copyable,
48-
and the queue will be sendable if the contained type is sendable.
45+
The `extra::ringbuf` module implements a double-ended queue with `O(1)`
46+
amortized inserts and removals from both ends of the container. It also has
47+
`O(1)` indexing like a vector. The contained elements are not required to be
48+
copyable, and the queue will be sendable if the contained type is sendable.
49+
Its interface `Deque` is defined in `extra::collections`.
50+
51+
The `extra::dlist` module implements a double-ended linked list, also
52+
implementing the `Deque` trait, with `O(1)` removals and inserts at either end,
53+
and `O(1)` concatenation.
4954

5055
## Priority queues
5156

@@ -197,11 +202,11 @@ The function `range` (or `range_inclusive`) allows to simply iterate through a g
197202
198203
~~~
199204
for i in range(0, 5) {
200-
printf!("%d ", i) // prints "0 1 2 3 4"
205+
print!("{} ", i) // prints "0 1 2 3 4"
201206
}
202207

203208
for i in std::iter::range_inclusive(0, 5) { // needs explicit import
204-
printf!("%d ", i) // prints "0 1 2 3 4 5"
209+
print!("{} ", i) // prints "0 1 2 3 4 5"
205210
}
206211
~~~
207212
@@ -233,15 +238,15 @@ let mut it = xs.iter().zip(ys.iter());
233238

234239
// print out the pairs of elements up to (&3, &"baz")
235240
for (x, y) in it {
236-
printfln!("%d %s", *x, *y);
241+
println!("{} {}", *x, *y);
237242

238243
if *x == 3 {
239244
break;
240245
}
241246
}
242247

243248
// yield and print the last pair from the iterator
244-
printfln!("last: %?", it.next());
249+
println!("last: {:?}", it.next());
245250

246251
// the iterator is now fully consumed
247252
assert!(it.next().is_none());
@@ -335,13 +340,13 @@ another `DoubleEndedIterator` with `next` and `next_back` exchanged.
335340
~~~
336341
let xs = [1, 2, 3, 4, 5, 6];
337342
let mut it = xs.iter();
338-
printfln!("%?", it.next()); // prints `Some(&1)`
339-
printfln!("%?", it.next()); // prints `Some(&2)`
340-
printfln!("%?", it.next_back()); // prints `Some(&6)`
343+
println!("{:?}", it.next()); // prints `Some(&1)`
344+
println!("{:?}", it.next()); // prints `Some(&2)`
345+
println!("{:?}", it.next_back()); // prints `Some(&6)`
341346
342347
// prints `5`, `4` and `3`
343348
for &x in it.invert() {
344-
printfln!("%?", x)
349+
println!("{}", x)
345350
}
346351
~~~
347352

@@ -356,11 +361,11 @@ let xs = [1, 2, 3, 4];
356361
let ys = [5, 6, 7, 8];
357362
let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
358363
359-
printfln!("%?", it.next()); // prints `Some(2)`
364+
println!("{:?}", it.next()); // prints `Some(2)`
360365
361366
// prints `16`, `14`, `12`, `10`, `8`, `6`, `4`
362367
for x in it.invert() {
363-
printfln!("%?", x);
368+
println!("{}", x);
364369
}
365370
~~~
366371

@@ -387,17 +392,17 @@ underlying iterators are.
387392
let xs = [1, 2, 3, 4, 5];
388393
let ys = ~[7, 9, 11];
389394
let mut it = xs.iter().chain(ys.iter());
390-
printfln!("%?", it.idx(0)); // prints `Some(&1)`
391-
printfln!("%?", it.idx(5)); // prints `Some(&7)`
392-
printfln!("%?", it.idx(7)); // prints `Some(&11)`
393-
printfln!("%?", it.idx(8)); // prints `None`
395+
println!("{:?}", it.idx(0)); // prints `Some(&1)`
396+
println!("{:?}", it.idx(5)); // prints `Some(&7)`
397+
println!("{:?}", it.idx(7)); // prints `Some(&11)`
398+
println!("{:?}", it.idx(8)); // prints `None`
394399
395400
// yield two elements from the beginning, and one from the end
396401
it.next();
397402
it.next();
398403
it.next_back();
399404
400-
printfln!("%?", it.idx(0)); // prints `Some(&3)`
401-
printfln!("%?", it.idx(4)); // prints `Some(&9)`
402-
printfln!("%?", it.idx(6)); // prints `None`
405+
println!("{:?}", it.idx(0)); // prints `Some(&3)`
406+
println!("{:?}", it.idx(4)); // prints `Some(&9)`
407+
println!("{:?}", it.idx(6)); // prints `None`
403408
~~~

branches/snap-stage3/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,15 +2979,15 @@ tutorials on individual topics.
29792979
* [The foreign function interface][ffi]
29802980
* [Containers and iterators](tutorial-container.html)
29812981
* [Error-handling and Conditions](tutorial-conditions.html)
2982-
* [Packaging up Rust code](rustpkg)
2982+
* [Packaging up Rust code][rustpkg]
29832983

29842984
There is further documentation on the [wiki], however those tend to be even more out of date as this document.
29852985

29862986
[borrow]: tutorial-borrowed-ptr.html
29872987
[tasks]: tutorial-tasks.html
29882988
[macros]: tutorial-macros.html
29892989
[ffi]: tutorial-ffi.html
2990-
[rustpkg]: tutorial-rustpkg.html
2990+
[rustpkg]: rustpkg.html
29912991

29922992
[wiki]: https://github.com/mozilla/rust/wiki/Docs
29932993

branches/snap-stage3/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)
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/snap-stage3/mk/platform.mk

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
343343
CFG_LDPATH_mips-unknown-linux-gnu :=
344344
CFG_RUN_mips-unknown-linux-gnu=
345345
CFG_RUN_TARG_mips-unknown-linux-gnu=
346-
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
347346

348347
# i686-pc-mingw32 configuration
349348
CC_i686-pc-mingw32=$(CC)
@@ -353,7 +352,7 @@ AR_i686-pc-mingw32=$(AR)
353352
CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
354353
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
355354
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
356-
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
355+
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
357356
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
358357
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
359358
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -362,7 +361,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
362361
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
363362
CFG_INSTALL_NAME_i686-pc-mingw32 =
364363
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
365-
CFG_LLVM_BUILD_ENV_i686-pc-mingw32 := CPATH=$(CFG_SRC_DIR)src/etc/mingw-fix-include
366364
CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
367365
CFG_WINDOWSY_i686-pc-mingw32 := 1
368366
CFG_UNIXY_i686-pc-mingw32 :=
@@ -481,7 +479,7 @@ define CFG_MAKE_TOOLCHAIN
481479
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
482480
$$(call CFG_INSTALL_NAME_$(1),$$(4))
483481

484-
ifeq ($$(findstring $(HOST_$(1)),arm mips),)
482+
ifneq ($(HOST_$(1)),arm)
485483

486484
# We're using llvm-mc as our assembler because it supports
487485
# .cfi pseudo-ops on mac
@@ -493,7 +491,7 @@ define CFG_MAKE_TOOLCHAIN
493491
-o=$$(1)
494492
else
495493

496-
# For the ARM and MIPS crosses, use the toolchain assembler
494+
# For the ARM crosses, use the toolchain assembler
497495
# XXX: We should be able to use the LLVM assembler
498496
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
499497

branches/snap-stage3/mk/rt.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# working under these assumptions).
2525

2626
# Hack for passing flags into LIBUV, see below.
27-
LIBUV_FLAGS_i386 = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
27+
LIBUV_FLAGS_i386 = -m32 -fPIC
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929
ifeq ($(OSTYPE_$(1)), linux-androideabi)
3030
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
@@ -71,6 +71,7 @@ RUNTIME_CXXS_$(1)_$(2) := \
7171
rt/sync/lock_and_signal.cpp \
7272
rt/sync/rust_thread.cpp \
7373
rt/rust_builtin.cpp \
74+
rt/rust_run_program.cpp \
7475
rt/rust_rng.cpp \
7576
rt/rust_upcall.cpp \
7677
rt/rust_uv.cpp \

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ extern mod extra;
1717

1818
use std::os;
1919
use std::rt;
20+
use std::f64;
2021

2122
use extra::getopts;
2223
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -130,7 +131,7 @@ pub fn parse_config(args: ~[~str]) -> config {
130131
ratchet_noise_percent:
131132
getopts::opt_maybe_str(matches,
132133
"ratchet-noise-percent").map_move(|s|
133-
from_str::<f64>(s).unwrap()),
134+
f64::from_str(s).unwrap()),
134135
runtool: getopts::opt_maybe_str(matches, "runtool"),
135136
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
136137
jit: getopts::opt_present(matches, "jit"),

branches/snap-stage3/src/etc/mingw-fix-include/README.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

branches/snap-stage3/src/etc/mingw-fix-include/bits/c++config.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

branches/snap-stage3/src/etc/mingw-fix-include/winbase.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

branches/snap-stage3/src/etc/mingw-fix-include/winsock2.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

branches/snap-stage3/src/libextra/glob.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ fn list_dir_sorted(path: &Path) -> ~[Path] {
137137
/**
138138
* A compiled Unix shell style pattern.
139139
*/
140+
#[cfg(stage0)]
141+
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes)]
142+
pub struct Pattern {
143+
priv tokens: ~[PatternToken]
144+
}
145+
146+
/**
147+
* A compiled Unix shell style pattern.
148+
*/
149+
#[cfg(not(stage0))]
140150
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
141151
pub struct Pattern {
142152
priv tokens: ~[PatternToken]
@@ -455,10 +465,39 @@ fn is_sep(c: char) -> bool {
455465
}
456466
}
457467
468+
/**
469+
* Configuration options to modify the behaviour of `Pattern::matches_with(..)`
470+
*/
471+
#[cfg(stage0)]
472+
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes)]
473+
pub struct MatchOptions {
474+
475+
/**
476+
* Whether or not patterns should be matched in a case-sensitive manner. This
477+
* currently only considers upper/lower case relationships between ASCII characters,
478+
* but in future this might be extended to work with Unicode.
479+
*/
480+
case_sensitive: bool,
481+
482+
/**
483+
* If this is true then path-component separator characters (e.g. `/` on Posix)
484+
* must be matched by a literal `/`, rather than by `*` or `?` or `[...]`
485+
*/
486+
require_literal_separator: bool,
487+
488+
/**
489+
* If this is true then paths that contain components that start with a `.` will
490+
* not match unless the `.` appears literally in the pattern: `*`, `?` or `[...]`
491+
* will not match. This is useful because such files are conventionally considered
492+
* hidden on Unix systems and it might be desirable to skip them when listing files.
493+
*/
494+
require_literal_leading_dot: bool
495+
}
458496
459497
/**
460498
* Configuration options to modify the behaviour of `Pattern::matches_with(..)`
461499
*/
500+
#[cfg(not(stage0))]
462501
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
463502
pub struct MatchOptions {
464503

0 commit comments

Comments
 (0)