Skip to content

Commit c3e99c6

Browse files
committed
---
yaml --- r: 133983 b: refs/heads/master c: e86c87a h: refs/heads/master i: 133981: 27dd268 133979: 096557a 133975: adee4b8 133967: 558f74f 133951: 1f6673b v: v3
1 parent 2743229 commit c3e99c6

File tree

261 files changed

+1394
-1784
lines changed

Some content is hidden

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

261 files changed

+1394
-1784
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: df34b082abb184054961a641bbe40a450ec92b0d
2+
refs/heads/master: e86c87a81e69de51cfed5719888840f25266a8d8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 437179ed8bf7f7672f84b19265df1ce569e70490
55
refs/heads/try: 777654cfccbfa39bc7f671d8e9629018ed8ca12d

trunk/configure

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,6 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
453453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
454454
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
455455

456-
valopt release-channel "source" "the name of the release channel to build"
457-
458456
# On windows we just store the libraries in the bin directory because
459457
# there's no rpath. This is where the build system itself puts libraries;
460458
# --libdir is used to configure the installation directory.
@@ -483,23 +481,6 @@ CFG_BUILD=`echo "${CFG_BUILD}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
483481
CFG_HOST=`echo "${CFG_HOST}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
484482
CFG_TARGET=`echo "${CFG_TARGET}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
485483

486-
# Validate the release channel
487-
case "$CFG_RELEASE_CHANNEL" in
488-
(source | nightly | beta | stable)
489-
;;
490-
(*)
491-
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
492-
;;
493-
esac
494-
495-
# Continue supporting the old --enable-nightly flag to transition the bots
496-
# XXX Remove me
497-
if [ $CFG_ENABLE_NIGHTLY -eq 1 ]
498-
then
499-
CFG_RELEASE_CHANNEL=nightly
500-
putvar CFG_RELEASE_CHANNEL
501-
fi
502-
503484
step_msg "looking for build programs"
504485

505486
probe_need CFG_PERL perl
@@ -655,7 +636,7 @@ then
655636
# check that gcc, cc and g++ all point to the same compiler.
656637
# note that for xcode 5, g++ points to clang, not clang++
657638
if !((chk_cc gcc clang && chk_cc g++ clang) ||
658-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))); then
639+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
659640
err "the gcc and g++ in your path point to different compilers.
660641
Check which versions are in your path with gcc --version and g++ --version.
661642
To resolve this problem, either fix your PATH or run configure with --enable-clang"

trunk/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.12.0" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS

trunk/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

trunk/mk/main.mk

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,22 @@
1414

1515
# The version number
1616
CFG_RELEASE_NUM=0.12.0
17+
CFG_RELEASE_LABEL=-pre
1718

1819
CFG_FILENAME_EXTRA=4e7c5e5c
1920

20-
ifeq ($(CFG_RELEASE_CHANNEL),stable)
21-
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
22-
CFG_RELEASE=$(CFG_RELEASE_NUM)
23-
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
24-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
25-
endif
26-
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
28-
# When building beta/nightly distributables just reuse the same "beta"
29-
# name so when we upload we'll always override the previous
30-
# nighly. This doesn't actually impact the version reported by rustc -
31-
# it's just for file naming.
32-
CFG_PACKAGE_VERS=beta
33-
endif
34-
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
35-
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
21+
ifndef CFG_ENABLE_NIGHTLY
22+
# This is the normal version string
23+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
24+
CFG_PACKAGE_VERS=$(CFG_RELEASE)
25+
else
26+
# Modify the version label for nightly builds
27+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)-nightly
28+
# When building nightly distributables just reuse the same "rust-nightly" name
29+
# so when we upload we'll always override the previous nighly. This doesn't actually
30+
# impact the version reported by rustc - it's just for file naming.
3631
CFG_PACKAGE_VERS=nightly
3732
endif
38-
ifeq ($(CFG_RELEASE_CHANNEL),source)
39-
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
41-
endif
42-
4333
# The name of the package to use for creating tarballs, installers etc.
4434
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
4535

trunk/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ pub fn run_tests(config: &Config) {
259259
// parallel (especially when we have lots and lots of child processes).
260260
// For context, see #8904
261261
io::test::raise_fd_limit();
262-
let res = test::run_tests_console(&opts, tests.into_iter().collect());
262+
let res = test::run_tests_console(&opts, tests.move_iter().collect());
263263
match res {
264264
Ok(true) => {}
265265
Ok(false) => fail!("Some tests failed"),
@@ -400,4 +400,4 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
400400
},
401401
_ => None
402402
}
403-
}
403+
}

trunk/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn run(lib_path: &str,
4040
let mut cmd = Command::new(prog);
4141
cmd.args(args);
4242
add_target_env(&mut cmd, lib_path, aux_path);
43-
for (key, val) in env.into_iter() {
43+
for (key, val) in env.move_iter() {
4444
cmd.env(key, val);
4545
}
4646

@@ -72,7 +72,7 @@ pub fn run_background(lib_path: &str,
7272
let mut cmd = Command::new(prog);
7373
cmd.args(args);
7474
add_target_env(&mut cmd, lib_path, aux_path);
75-
for (key, val) in env.into_iter() {
75+
for (key, val) in env.move_iter() {
7676
cmd.env(key, val);
7777
}
7878

trunk/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
768768
"--debuginfo".to_string()
769769
];
770770
let new_options =
771-
split_maybe_args(options).into_iter()
771+
split_maybe_args(options).move_iter()
772772
.filter(|x| !options_to_remove.contains(x))
773773
.collect::<Vec<String>>()
774774
.connect(" ");
@@ -1461,7 +1461,7 @@ fn _arm_exec_compiled_test(config: &Config,
14611461

14621462
// run test via adb_run_wrapper
14631463
runargs.push("shell".to_string());
1464-
for (key, val) in env.into_iter() {
1464+
for (key, val) in env.move_iter() {
14651465
runargs.push(format!("{}={}", key, val));
14661466
}
14671467
runargs.push(format!("{}/adb_run_wrapper.sh", config.adb_test_dir));

trunk/src/doc/guide-tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ fn partial_sum(start: uint) -> f64 {
235235
}
236236
237237
fn main() {
238-
let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) }));
238+
let mut futures = Vec::from_fn(1000, |ind| Future::spawn( proc() { partial_sum(ind) }));
239239
240240
let mut final_res = 0f64;
241-
for ft in futures.iter_mut() {
241+
for ft in futures.mut_iter() {
242242
final_res += ft.get();
243243
}
244244
println!("π^2/6 is not far from : {}", final_res);

trunk/src/doc/guide.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ $ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
2929
(If you're concerned about `curl | sudo sh`, please keep reading. Disclaimer
3030
below.)
3131

32-
If you're on Windows, please download either the [32-bit
33-
installer](https://static.rust-lang.org/dist/rust-nightly-i686-w64-mingw32.exe)
34-
or the [64-bit
35-
installer](https://static.rust-lang.org/dist/rust-nightly-x86_64-w64-mingw32.exe)
36-
and run it.
32+
If you're on Windows, please [download this .exe and run
33+
it](https://static.rust-lang.org/dist/rust-nightly-install.exe).
3734

3835
If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
3936
Not every programming language is great for everyone. Just pass an argument to
@@ -188,8 +185,8 @@ Next up is this line:
188185
This line does all of the work in our little program. There are a number of
189186
details that are important here. The first is that it's indented with four
190187
spaces, not tabs. Please configure your editor of choice to insert four spaces
191-
with the tab key. We provide some [sample configurations for various
192-
editors](https://github.com/rust-lang/rust/tree/master/src/etc).
188+
with the tab key. We provide some sample configurations for various editors
189+
[here](https://github.com/rust-lang/rust/tree/master/src/etc).
193190

194191
The second point is the `println!()` part. This is calling a Rust **macro**,
195192
which is how metaprogramming is done in Rust. If it were a function instead, it
@@ -395,10 +392,14 @@ By the way, in these examples, `i` indicates that the number is an integer.
395392

396393
Rust is a statically typed language, which means that we specify our types up
397394
front. So why does our first example compile? Well, Rust has this thing called
398-
"type inference." If it can figure out what the type of something is, Rust
395+
"[Hindley-Milner type
396+
inference](http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system)",
397+
named after some really smart type theorists. If you clicked that link, don't
398+
be scared: what this means for you is that Rust will attempt to infer the types
399+
in your program, and it's pretty good at it. If it can infer the type, Rust
399400
doesn't require you to actually type it out.
400401

401-
We can add the type if we want to, though. Types come after a colon (`:`):
402+
We can add the type if we want to. Types come after a colon (`:`):
402403

403404
```{rust}
404405
let x: int = 5;
@@ -1280,15 +1281,15 @@ two main looping constructs: `for` and `while`.
12801281

12811282
The `for` loop is used to loop a particular number of times. Rust's `for` loops
12821283
work a bit differently than in other systems languages, however. Rust's `for`
1283-
loop doesn't look like this "C style" `for` loop:
1284+
loop doesn't look like this C `for` loop:
12841285

1285-
```{c}
1286+
```{ignore,c}
12861287
for (x = 0; x < 10; x++) {
12871288
printf( "%d\n", x );
12881289
}
12891290
```
12901291

1291-
Instead, it looks like this:
1292+
It looks like this:
12921293

12931294
```{rust}
12941295
for x in range(0i, 10i) {
@@ -1311,13 +1312,14 @@ valid for the loop body. Once the body is over, the next value is fetched from
13111312
the iterator, and we loop another time. When there are no more values, the
13121313
`for` loop is over.
13131314

1314-
In our example, `range` is a function that takes a start and an end position,
1315-
and gives an iterator over those values. The upper bound is exclusive, though,
1316-
so our loop will print `0` through `9`, not `10`.
1315+
In our example, the `range` function is a function, provided by Rust, that
1316+
takes a start and an end position, and gives an iterator over those values. The
1317+
upper bound is exclusive, though, so our loop will print `0` through `9`, not
1318+
`10`.
13171319

13181320
Rust does not have the "C style" `for` loop on purpose. Manually controlling
13191321
each element of the loop is complicated and error prone, even for experienced C
1320-
developers.
1322+
developers.
13211323

13221324
We'll talk more about `for` when we cover **iterator**s, later in the Guide.
13231325

@@ -4271,7 +4273,7 @@ very common with iterators: we can ignore unnecessary bounds checks, but still
42714273
know that we're safe.
42724274

42734275
There's another detail here that's not 100% clear because of how `println!`
4274-
works. `num` is actually of type `&int`. That is, it's a reference to an `int`,
4276+
works. `num` is actually of type `&int`, that is, it's a reference to an `int`,
42754277
not an `int` itself. `println!` handles the dereferencing for us, so we don't
42764278
see it. This code works fine too:
42774279

trunk/src/doc/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ There are questions that are asked quite often, and so we've made FAQs for them:
8686

8787
# The standard library
8888

89-
We have [API documentation for the entire standard
90-
library](std/index.html). There's a list of crates on the left with more
91-
specific sections, or you can use the search bar at the top to search for
92-
something if you know its name.
89+
You can find function-level documentation for the entire standard library
90+
[here](std/index.html). There's a list of crates on the left with more specific
91+
sections, or you can use the search bar at the top to search for something if
92+
you know its name.
9393

9494
# External documentation
9595

trunk/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3698,7 +3698,7 @@ There are two varieties of pointer in Rust:
36983698
they exist to support interoperability with foreign code,
36993699
and writing performance-critical or low-level functions.
37003700

3701-
The standard library contains additional 'smart pointer' types beyond references
3701+
The standard library contains addtional 'smart pointer' types beyond references
37023702
and raw pointers.
37033703

37043704
### Function types

trunk/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.12.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.12.0-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

trunk/src/etc/licenseck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"test/bench/shootout-mandelbrot.rs", # BSD
5050
"test/bench/shootout-meteor.rs", # BSD
5151
"test/bench/shootout-nbody.rs", # BSD
52+
"test/bench/shootout-pidigits.rs", # BSD
5253
"test/bench/shootout-regex-dna.rs", # BSD
5354
"test/bench/shootout-reverse-complement.rs", # BSD
5455
"test/bench/shootout-threadring.rs", # BSD

trunk/src/liballoc/heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static MIN_ALIGN: uint = 16;
140140
#[cfg(jemalloc)]
141141
mod imp {
142142
use core::option::{None, Option};
143-
use core::ptr::{RawPtr, null_mut, null};
143+
use core::ptr::{RawPtr, mut_null, null};
144144
use core::num::Int;
145145
use libc::{c_char, c_int, c_void, size_t};
146146
use super::MIN_ALIGN;
@@ -230,7 +230,7 @@ mod imp {
230230

231231
pub fn stats_print() {
232232
unsafe {
233-
je_malloc_stats_print(None, null_mut(), null())
233+
je_malloc_stats_print(None, mut_null(), null())
234234
}
235235
}
236236
}

trunk/src/liballoc/libc_heap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
//! The global (exchange) heap.
1313
1414
use libc::{c_void, size_t, free, malloc, realloc};
15-
use core::ptr::{RawPtr, null_mut};
15+
use core::ptr::{RawPtr, mut_null};
1616

1717
/// A wrapper around libc::malloc, aborting on out-of-memory.
1818
#[inline]
1919
pub unsafe fn malloc_raw(size: uint) -> *mut u8 {
2020
// `malloc(0)` may allocate, but it may also return a null pointer
2121
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html
2222
if size == 0 {
23-
null_mut()
23+
mut_null()
2424
} else {
2525
let p = malloc(size as size_t);
2626
if p.is_null() {
@@ -37,7 +37,7 @@ pub unsafe fn realloc_raw(ptr: *mut u8, size: uint) -> *mut u8 {
3737
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/realloc.html
3838
if size == 0 {
3939
free(ptr as *mut c_void);
40-
null_mut()
40+
mut_null()
4141
} else {
4242
let p = realloc(ptr as *mut c_void, size as size_t);
4343
if p.is_null() {

trunk/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ impl<T> TypedArena<T> {
448448
#[inline]
449449
pub fn with_capacity(capacity: uint) -> TypedArena<T> {
450450
unsafe {
451-
let chunk = TypedArenaChunk::<T>::new(ptr::null_mut(), capacity);
451+
let chunk = TypedArenaChunk::<T>::new(ptr::mut_null(), capacity);
452452
TypedArena {
453453
ptr: Cell::new((*chunk).start() as *const T),
454454
end: Cell::new((*chunk).end() as *const T),

trunk/src/libcollections/bitv.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl Bitv {
178178
// `op` is a bitwise operation, since any bits that should've
179179
// been masked were fine to change anyway. `b` is masked to
180180
// make sure its unmasked bits do not cause damage.
181-
for (a, (_, b)) in self.storage.iter_mut()
181+
for (a, (_, b)) in self.storage.mut_iter()
182182
.zip(other.mask_words(0)) {
183183
let w = op(*a, b);
184184
if *a != w {
@@ -310,7 +310,7 @@ impl Bitv {
310310
/// ```
311311
#[inline]
312312
pub fn set_all(&mut self) {
313-
for w in self.storage.iter_mut() { *w = !0u; }
313+
for w in self.storage.mut_iter() { *w = !0u; }
314314
}
315315

316316
/// Flips all bits.
@@ -329,7 +329,7 @@ impl Bitv {
329329
/// ```
330330
#[inline]
331331
pub fn negate(&mut self) {
332-
for w in self.storage.iter_mut() { *w = !*w; }
332+
for w in self.storage.mut_iter() { *w = !*w; }
333333
}
334334

335335
/// Calculates the union of two bitvectors. This acts like the bitwise `or`
@@ -797,7 +797,7 @@ impl Collection for Bitv {
797797
impl Mutable for Bitv {
798798
#[inline]
799799
fn clear(&mut self) {
800-
for w in self.storage.iter_mut() { *w = 0u; }
800+
for w in self.storage.mut_iter() { *w = 0u; }
801801
}
802802
}
803803

@@ -831,7 +831,7 @@ impl Clone for Bitv {
831831
fn clone_from(&mut self, source: &Bitv) {
832832
self.nbits = source.nbits;
833833
self.storage.reserve(source.storage.len());
834-
for (i, w) in self.storage.iter_mut().enumerate() { *w = source.storage[i]; }
834+
for (i, w) in self.storage.mut_iter().enumerate() { *w = source.storage[i]; }
835835
}
836836
}
837837

0 commit comments

Comments
 (0)