Skip to content

Commit f25f99f

Browse files
committed
---
yaml --- r: 136538 b: refs/heads/dist-snap c: dbaa930 h: refs/heads/master v: v3
1 parent 9558126 commit f25f99f

File tree

498 files changed

+13413
-6692
lines changed

Some content is hidden

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

498 files changed

+13413
-6692
lines changed

[refs]

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

branches/dist-snap/configure

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ 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+
456458
# On windows we just store the libraries in the bin directory because
457459
# there's no rpath. This is where the build system itself puts libraries;
458460
# --libdir is used to configure the installation directory.
@@ -475,11 +477,22 @@ fi
475477
step_msg "validating $CFG_SELF args"
476478
validate_opt
477479

478-
# Temporarily support the old windows triples while the bots make the transition
480+
# Validate the release channel
481+
case "$CFG_RELEASE_CHANNEL" in
482+
(source | nightly | beta | stable)
483+
;;
484+
(*)
485+
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
486+
;;
487+
esac
488+
489+
# Continue supporting the old --enable-nightly flag to transition the bots
479490
# XXX Remove me
480-
CFG_BUILD=`echo "${CFG_BUILD}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
481-
CFG_HOST=`echo "${CFG_HOST}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
482-
CFG_TARGET=`echo "${CFG_TARGET}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
491+
if [ $CFG_ENABLE_NIGHTLY -eq 1 ]
492+
then
493+
CFG_RELEASE_CHANNEL=nightly
494+
putvar CFG_RELEASE_CHANNEL
495+
fi
483496

484497
step_msg "looking for build programs"
485498

@@ -636,7 +649,7 @@ then
636649
# check that gcc, cc and g++ all point to the same compiler.
637650
# note that for xcode 5, g++ points to clang, not clang++
638651
if !((chk_cc gcc clang && chk_cc g++ clang) ||
639-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
652+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))); then
640653
err "the gcc and g++ in your path point to different compilers.
641654
Check which versions are in your path with gcc --version and g++ --version.
642655
To resolve this problem, either fix your PATH or run configure with --enable-clang"

branches/dist-snap/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-pre" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS

branches/dist-snap/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-pre" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/dist-snap/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

6161
DEPS_core :=
62-
DEPS_rlibc :=
62+
DEPS_rlibc := core
6363
DEPS_unicode := core
6464
DEPS_alloc := core libc native:jemalloc
6565
DEPS_debug := std

branches/dist-snap/mk/main.mk

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

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

1918
CFG_FILENAME_EXTRA=4e7c5e5c
2019

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.
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
3136
CFG_PACKAGE_VERS=nightly
3237
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+
3343
# The name of the package to use for creating tarballs, installers etc.
3444
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
3545

branches/dist-snap/mk/tests.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
194194
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
195195
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
196196

197-
# NOTE: Remove after reprogramming windows bots
198-
check-fast: check-lite
199-
200197
# Some less critical tests that are not prone to breakage.
201198
# Not run as part of the normal test suite, but tested by bors on checkin.
202199
check-secondary: check-lexer check-pretty

branches/dist-snap/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.move_iter().collect());
262+
let res = test::run_tests_console(&opts, tests.into_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+
}

branches/dist-snap/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.move_iter() {
43+
for (key, val) in env.into_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.move_iter() {
75+
for (key, val) in env.into_iter() {
7676
cmd.env(key, val);
7777
}
7878

branches/dist-snap/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).move_iter()
771+
split_maybe_args(options).into_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.move_iter() {
1464+
for (key, val) in env.into_iter() {
14651465
runargs.push(format!("{}={}", key, val));
14661466
}
14671467
runargs.push(format!("{}/adb_run_wrapper.sh", config.adb_test_dir));

branches/dist-snap/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(1000, |ind| Future::spawn( proc() { partial_sum(ind) }));
238+
let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) }));
239239
240240
let mut final_res = 0f64;
241-
for ft in futures.mut_iter() {
241+
for ft in futures.iter_mut() {
242242
final_res += ft.get();
243243
}
244244
println!("π^2/6 is not far from : {}", final_res);

branches/dist-snap/src/doc/guide-unsafe.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,12 @@ fn start(_argc: int, _argv: *const *const u8) -> int {
461461
0
462462
}
463463
464-
// These functions are invoked by the compiler, but not
464+
// These functions and traits are used by the compiler, but not
465465
// for a bare-bones hello world. These are normally
466466
// provided by libstd.
467467
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
468468
#[lang = "eh_personality"] extern fn eh_personality() {}
469+
#[lang = "sized"] trait Sized { }
469470
# // fn main() {} tricked you, rustdoc!
470471
```
471472

@@ -488,13 +489,14 @@ pub extern fn main(argc: int, argv: *const *const u8) -> int {
488489
489490
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
490491
#[lang = "eh_personality"] extern fn eh_personality() {}
492+
#[lang = "sized"] trait Sized { }
491493
# // fn main() {} tricked you, rustdoc!
492494
```
493495

494496

495497
The compiler currently makes a few assumptions about symbols which are available
496498
in the executable to call. Normally these functions are provided by the standard
497-
library, but without it you must define your own.
499+
xlibrary, but without it you must define your own.
498500

499501
The first of these two functions, `stack_exhausted`, is invoked whenever stack
500502
overflow is detected. This function has a number of restrictions about how it
@@ -508,6 +510,12 @@ mechanisms of the compiler. This is often mapped to GCC's personality function
508510
information), but crates which do not trigger failure can be assured that this
509511
function is never called.
510512

513+
The final item in the example is a trait called `Sized`. This a trait
514+
that represents data of a known static size: it is integral to the
515+
Rust type system, and so the compiler expects the standard library to
516+
provide it. Since you are not using the standard library, you have to
517+
provide it yourself.
518+
511519
## Using libcore
512520

513521
> **Note**: the core library's structure is unstable, and it is recommended to
@@ -686,6 +694,7 @@ fn main(argc: int, argv: *const *const u8) -> int {
686694
687695
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
688696
#[lang = "eh_personality"] extern fn eh_personality() {}
697+
#[lang = "sized"] trait Sized {}
689698
```
690699

691700
Note the use of `abort`: the `exchange_malloc` lang item is assumed to

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

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ $ 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 this .exe and run
33-
it](https://static.rust-lang.org/dist/rust-nightly-install.exe).
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.
3437

3538
If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
3639
Not every programming language is great for everyone. Just pass an argument to
@@ -152,7 +155,7 @@ Save the file, and then type this into your terminal window:
152155

153156
```{bash}
154157
$ rustc main.rs
155-
$ ./hello_world # or hello_world.exe on Windows
158+
$ ./main # or main.exe on Windows
156159
Hello, world!
157160
```
158161

@@ -164,7 +167,7 @@ fn main() {
164167
}
165168
```
166169

167-
These two lines define a **function** in Rust. The `main` function is special:
170+
These lines define a **function** in Rust. The `main` function is special:
168171
it's the beginning of every Rust program. The first line says "I'm declaring a
169172
function named `main`, which takes no arguments and returns nothing." If there
170173
were arguments, they would go inside the parentheses (`(` and `)`), and because
@@ -185,8 +188,8 @@ Next up is this line:
185188
This line does all of the work in our little program. There are a number of
186189
details that are important here. The first is that it's indented with four
187190
spaces, not tabs. Please configure your editor of choice to insert four spaces
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).
191+
with the tab key. We provide some [sample configurations for various
192+
editors](https://github.com/rust-lang/rust/tree/master/src/etc).
190193

191194
The second point is the `println!()` part. This is calling a Rust **macro**,
192195
which is how metaprogramming is done in Rust. If it were a function instead, it
@@ -232,10 +235,10 @@ main.exe main.rs
232235
```
233236

234237
There are now two files: our source code, with the `.rs` extension, and the
235-
executable (`hello_world.exe` on Windows, `hello_world` everywhere else)
238+
executable (`main.exe` on Windows, `main` everywhere else)
236239

237240
```{bash}
238-
$ ./hello_world # or hello_world.exe on Windows
241+
$ ./main # or main.exe on Windows
239242
```
240243

241244
This prints out our `Hello, world!` text to our terminal.
@@ -392,14 +395,10 @@ By the way, in these examples, `i` indicates that the number is an integer.
392395

393396
Rust is a statically typed language, which means that we specify our types up
394397
front. So why does our first example compile? Well, Rust has this thing called
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
398+
"type inference." If it can figure out what the type of something is, Rust
400399
doesn't require you to actually type it out.
401400

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

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

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

1286-
```{ignore,c}
1285+
```{c}
12871286
for (x = 0; x < 10; x++) {
12881287
printf( "%d\n", x );
12891288
}
12901289
```
12911290

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

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

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`.
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`.
13191317

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

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

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

42734271
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`,
4272+
works. `num` is actually of type `&int`. That is, it's a reference to an `int`,
42754273
not an `int` itself. `println!` handles the dereferencing for us, so we don't
42764274
see it. This code works fine too:
42774275

branches/dist-snap/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-
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.
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.
9393

9494
# External documentation
9595

branches/dist-snap/src/doc/rust.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,8 @@ The currently implemented features of the reference compiler are:
25572557

25582558
* `tuple_indexing` - Allows use of tuple indexing (expressions like `expr.0`)
25592559

2560+
* `associated_types` - Allows type aliases in traits. Experimental.
2561+
25602562
If a feature is promoted to a language feature, then all existing programs will
25612563
start to receive compilation warnings about #[feature] directives which enabled
25622564
the new feature (because the directive is no longer necessary). However, if
@@ -3698,7 +3700,7 @@ There are two varieties of pointer in Rust:
36983700
they exist to support interoperability with foreign code,
36993701
and writing performance-critical or low-level functions.
37003702

3701-
The standard library contains addtional 'smart pointer' types beyond references
3703+
The standard library contains additional 'smart pointer' types beyond references
37023704
and raw pointers.
37033705

37043706
### Function types

0 commit comments

Comments
 (0)