Skip to content

Commit af2f8ea

Browse files
committed
---
yaml --- r: 145322 b: refs/heads/try2 c: b094cf4 h: refs/heads/master v: v3
1 parent 8a3f114 commit af2f8ea

Some content is hidden

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

80 files changed

+3916
-496
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 76a53911b45aad4bb036bd7af596b6c43dd600a8
8+
refs/heads/try2: b094cf48e1c244978630d37af2f5ca03f540c719
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
22

3-
* text eol=lf
3+
* text=auto eol=lf
44
*.cpp rust
55
*.h rust
66
*.rs rust

branches/try2/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ endif
102102

103103
ifdef CFG_ENABLE_DEBUG
104104
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
105-
CFG_RUSTC_FLAGS += --cfg debug
106105
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
107106
else
107+
CFG_RUSTC_FLAGS += --cfg ndebug
108108
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
109109
endif
110110

branches/try2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ documentation.
6161

6262
[repo]: https://github.com/mozilla/rust
6363
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
64-
[tutorial]: http://static.rust-lang.org/doc/tutorial.html
64+
[tutorial]: http://static.rust-lang.org/doc/0.7/tutorial.html
6565

6666
## Notes
6767

branches/try2/RELEASES.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Version 0.8 (October 2013)
66
* Language
77
* The `for` loop syntax has changed to work with the `Iterator` trait.
88
* At long last, unwinding works on Windows.
9-
* Default methods definitely mostly work.
9+
* Default methods are ready for use.
1010
* Many trait inheritance bugs fixed.
1111
* Owned and borrowed trait objects work more reliably.
1212
* `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
13-
* rustc no longer emits code for the `debug!` macro unless it is passed
14-
`--cfg debug`
13+
* rustc can omit emission of code for the `debug!` macro if it is passed
14+
`--cfg ndebug`
1515
* mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
1616
for foo.rs, then foo/mod.rs, and will generate an error when both are
1717
present.
@@ -56,7 +56,7 @@ Version 0.8 (October 2013)
5656
be specified with `#[link_section = "..."]`.
5757
* The `proto!` syntax extension for defining bounded message protocols
5858
was removed.
59-
* `macro_rules!` is hygenic for `let` declarations.
59+
* `macro_rules!` is hygienic for `let` declarations.
6060
* The `#[export_name]` attribute specifies the name of a symbol.
6161
* `unreachable!` can be used to indicate unreachable code, and fails
6262
if executed.
@@ -92,7 +92,7 @@ Version 0.8 (October 2013)
9292
* std: Added `SharedPort` to `comm`.
9393
* std: `Eq` has a default method for `ne`; only `eq` is required
9494
in implementations.
95-
* std: `Ord` has default methods for `le`, `gt` and `le`; only `lt`
95+
* std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
9696
is required in implementations.
9797
* std: `is_utf8` performance is improved, impacting many string functions.
9898
* std: `os::MemoryMap` provides cross-platform mmap.
@@ -130,6 +130,7 @@ Version 0.8 (October 2013)
130130
* rustc's debug info generation (`-Z debug-info`) is greatly improved.
131131
* rustc accepts `--target-cpu` to compile to a specific CPU architecture,
132132
similarly to gcc's `--march` flag.
133+
* rustc's performance compiling small crates is much better.
133134
* rustpkg has received many improvements.
134135
* rustpkg supports git tags as package IDs.
135136
* rustpkg builds into target-specific directories so it can be used for
@@ -142,6 +143,7 @@ Version 0.8 (October 2013)
142143
* The runtime uses jemalloc for allocations.
143144
* Segmented stacks are temporarily disabled as part of the transition to
144145
the new runtime. Stack overflows are possible!
146+
* A new documentation backend, rustdoc_ng, is available for use
145147

146148
Version 0.7 (July 2013)
147149
-----------------------

branches/try2/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ opt optimize-cxx 1 "build optimized C++ code"
373373
opt optimize-llvm 1 "build optimized LLVM"
374374
opt optimize-tests 1 "build tests with optimizations"
375375
opt llvm-assertions 1 "build LLVM with assertions"
376-
opt debug 0 "build with extra debug fun"
376+
opt debug 1 "build with extra debug fun"
377377
opt ratchet-bench 0 "ratchet benchmarks"
378378
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
379379
opt manage-submodules 1 "let the build manage the git submodules"

branches/try2/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,8 +3428,8 @@ sign (`=`) followed by the log level, from 1 to 4, inclusive. Level 1
34283428
is the error level, 2 is warning, 3 info, and 4 debug. You can also
34293429
use the symbolic constants `error`, `warn`, `info`, and `debug`. Any
34303430
logs less than or equal to the specified level will be output. If not
3431-
specified then log level 4 is assumed. However, debug messages are
3432-
only available if `--cfg=debug` is passed to `rustc`.
3431+
specified then log level 4 is assumed. Debug messages can be omitted
3432+
by passing `--cfg ndebug` to `rustc`.
34333433

34343434
As an example, to see all the logs generated by the compiler, you would set
34353435
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `link`

branches/try2/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/try2/doc/tutorial.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ recommended.
6363

6464
Since the Rust compiler is written in Rust, it must be built by
6565
a precompiled "snapshot" version of itself (made in an earlier state
66-
of development). As such, source builds require a connection to
67-
the Internet, to fetch snapshots, and an OS that can execute the
68-
available snapshot binaries.
66+
of development). The source build automatically fetches these snapshots
67+
from the Internet on our supported platforms.
6968

7069
Snapshot binaries are currently built and tested on several platforms:
7170

@@ -2979,15 +2978,15 @@ tutorials on individual topics.
29792978
* [The foreign function interface][ffi]
29802979
* [Containers and iterators](tutorial-container.html)
29812980
* [Error-handling and Conditions](tutorial-conditions.html)
2982-
* [Packaging up Rust code](rustpkg)
2981+
* [Packaging up Rust code][rustpkg]
29832982

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

29862985
[borrow]: tutorial-borrowed-ptr.html
29872986
[tasks]: tutorial-tasks.html
29882987
[macros]: tutorial-macros.html
29892988
[ffi]: tutorial-ffi.html
2990-
[rustpkg]: tutorial-rustpkg.html
2989+
[rustpkg]: rustpkg.html
29912990

29922991
[wiki]: https://github.com/mozilla/rust/wiki/Docs
29932992

branches/try2/man/rustpkg.1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Remove all generated files from the \fIbuild\fR directory in the target's worksp
2727
Builds the specified target, and all its dependencies, and then installs the
2828
build products into the \fIlib\fR and \fIbin\fR directories of their respective
2929
workspaces.
30+
.TP
31+
\fBinit\fR
32+
Initializes the current working directory into a workspace.
3033

3134
.SS "BUILD COMMAND"
3235

@@ -59,6 +62,17 @@ Examples:
5962
$ rustpkg install github.com/mozilla/servo.git#1.2
6063
$ rustpkg install rust-glfw
6164

65+
.SS "INIT COMMAND"
66+
67+
rustpkg init
68+
69+
This will turn the current working directory into a workspace. The first
70+
command you run when starting off a new project.
71+
72+
Example:
73+
74+
$ rustpkg init
75+
6276
.SH "ENVIRONMENT"
6377

6478
.TP

branches/try2/mk/docs.mk

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ else
213213

214214
# The rustdoc executable
215215
RUSTDOC = $(HBIN2_H_$(CFG_BUILD_TRIPLE))/rustdoc$(X_$(CFG_BUILD_TRIPLE))
216+
RUSTDOC_NG = $(HBIN2_H_$(CFG_BUILD_TRIPLE))/rustdoc_ng$(X_$(CFG_BUILD_TRIPLE))
216217

217218
# The library documenting macro
218219
# $(1) - The output directory
@@ -230,8 +231,22 @@ doc/$(1)/rust.css: rust.css
230231
DOCS += doc/$(1)/index.html
231232
endef
232233

234+
# The library documenting macro
235+
# $(1) - The output directory
236+
# $(2) - The crate file
237+
# $(3) - The crate soruce files
238+
define libdocng
239+
doc/ng/$(1)/index.html: $(2) $(3) $$(RUSTDOC_NG)
240+
@$$(call E, rustdoc_ng: $$@)
241+
$(Q)$(RUSTDOC_NG) html $(2) -o doc/ng
242+
243+
DOCS += doc/ng/$(1)/index.html
244+
endef
245+
233246
$(eval $(call libdoc,std,$(STDLIB_CRATE),$(STDLIB_INPUTS)))
234247
$(eval $(call libdoc,extra,$(EXTRALIB_CRATE),$(EXTRALIB_INPUTS)))
248+
$(eval $(call libdocng,std,$(STDLIB_CRATE),$(STDLIB_INPUTS)))
249+
$(eval $(call libdocng,extra,$(EXTRALIB_CRATE),$(EXTRALIB_INPUTS)))
235250
endif
236251

237252

branches/try2/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
575575

576576
# The tests select when to use debug configuration on their own;
577577
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
578-
CTEST_RUSTC_FLAGS := $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
578+
CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
579579

580580
# The tests can not be optimized while the rest of the compiler is optimized, so
581581
# filter out the optimization (if any) from rustc and then figure out if we need

branches/try2/src/libextra/extra.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Rust extras are part of the standard Rust distribution.
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

28+
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
29+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
30+
passes = "strip-hidden")];
31+
2832
#[comment = "Rust extras"];
2933
#[license = "MIT/ASL2"];
3034
#[crate_type = "lib"];

branches/try2/src/libextra/glob.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* `glob`/`fnmatch` functions.
2424
*/
2525

26-
use std::{os, path, util};
26+
use std::{os, path};
2727

2828
use sort;
2929

@@ -356,7 +356,7 @@ impl Pattern {
356356
chars_eq(c, c2, options.case_sensitive)
357357
}
358358
AnySequence => {
359-
util::unreachable()
359+
unreachable!()
360360
}
361361
};
362362
if !matches {

branches/try2/src/libextra/terminfo/parm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
261261
flags.width = (cur as uint - '0' as uint);
262262
fstate = FormatStateWidth;
263263
}
264-
_ => util::unreachable()
264+
_ => unreachable!()
265265
}
266266
state = FormatPattern(flags, fstate);
267267
}
@@ -487,7 +487,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> {
487487
FormatDigit => 10,
488488
FormatOctal => 8,
489489
FormatHex|FormatHEX => 16,
490-
FormatString => util::unreachable()
490+
FormatString => unreachable!()
491491
};
492492
let mut s = ~[];
493493
match op {
@@ -535,7 +535,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> {
535535
s.push_all_move(s_);
536536
}
537537
}
538-
FormatString => util::unreachable()
538+
FormatString => unreachable!()
539539
}
540540
s
541541
}

0 commit comments

Comments
 (0)