Skip to content

Commit 4f3ae26

Browse files
committed
---
yaml --- r: 177911 b: refs/heads/snap-stage3 c: 42e4c1a h: refs/heads/master i: 177909: 11b8ae7 177907: f6d5348 177903: 7cbb792 v: v3
1 parent dae10d9 commit 4f3ae26

File tree

498 files changed

+3916
-6496
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

+3916
-6496
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: 474b324eda10440d6568ef872a7307d38e7de95b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f1ace34d5ca0233e1649b699f795efc108f1e685
4+
refs/heads/snap-stage3: 42e4c1aef6594aac2d27b4bb31896e023863817d
55
refs/heads/try: fde4472848b662a4d1236388c4cf15e2450237e6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ Olivier Saut <[email protected]>
516516
Olle Jonsson <[email protected]>
517517
Or Brostovski <[email protected]>
518518
Oren Hazi <[email protected]>
519-
Orphée Lafond-Lummis <o@orftz.com>
519+
Orpheus Lummis <o@orpheuslummis.com>
520520
521521
Pablo Brasero <[email protected]>
522522
Palmer Cox <[email protected]>

branches/snap-stage3/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ example, if it's 2014, and you change a Rust file that was created in
5050
# Coordination and communication
5151

5252
Get feedback from other developers on
53-
[discuss.rust-lang.org][discuss], and
53+
[internals.rust-lang.org][internals], and
5454
[#rust-internals][pound-rust-internals].
5555

5656
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
57-
[discuss]: http://discuss.rust-lang.org
57+
[internals]: http://internals.rust-lang.org
5858

5959
For more details, please refer to
6060
[Note-development-policy](https://github.com/rust-lang/rust/wiki/Note-development-policy).

branches/snap-stage3/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ documentation.
3030

3131
To build from the [tarball] do:
3232

33-
$ curl -O https://static.rust-lang.org/dist/rust-nightly.tar.gz
34-
$ tar -xzf rust-nightly.tar.gz
35-
$ cd rust-nightly
33+
$ curl -O https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
34+
$ tar -xzf rustc-nightly-src.tar.gz
35+
$ cd rustc-nightly
3636

3737
Or to build from the [repo] do:
3838

@@ -80,7 +80,7 @@ $ pacman -S base-devel
8080
$ make && make install
8181

8282
[repo]: https://github.com/rust-lang/rust
83-
[tarball]: https://static.rust-lang.org/dist/rust-nightly.tar.gz
83+
[tarball]: https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
8484
[trpl]: http://doc.rust-lang.org/book/index.html
8585

8686
## Notes
@@ -112,11 +112,11 @@ The Rust community congregates in a few places:
112112

113113
* [StackOverflow] - Get help here.
114114
* [/r/rust] - General discussion.
115-
* [discuss.rust-lang.org] - For development of the Rust language itself.
115+
* [internals.rust-lang.org] - For development of the Rust language itself.
116116

117117
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
118118
[/r/rust]: http://reddit.com/r/rust
119-
[discuss.rust-lang.org]: http://discuss.rust-lang.org/
119+
[internals.rust-lang.org]: http://internals.rust-lang.org/
120120

121121
## License
122122

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

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ pub use self::Mode::*;
1212
use std::fmt;
1313
use std::str::FromStr;
1414

15-
#[cfg(stage0)] // NOTE: remove impl after snapshot
16-
#[derive(Clone, Copy, PartialEq, Show)]
17-
pub enum Mode {
18-
CompileFail,
19-
RunFail,
20-
RunPass,
21-
RunPassValgrind,
22-
Pretty,
23-
DebugInfoGdb,
24-
DebugInfoLldb,
25-
Codegen
26-
}
27-
28-
#[cfg(not(stage0))] // NOTE: remove cfg after snapshot
2915
#[derive(Clone, Copy, PartialEq, Debug)]
3016
pub enum Mode {
3117
CompileFail,
@@ -39,17 +25,18 @@ pub enum Mode {
3925
}
4026

4127
impl FromStr for Mode {
42-
fn from_str(s: &str) -> Option<Mode> {
28+
type Err = ();
29+
fn from_str(s: &str) -> Result<Mode, ()> {
4330
match s {
44-
"compile-fail" => Some(CompileFail),
45-
"run-fail" => Some(RunFail),
46-
"run-pass" => Some(RunPass),
47-
"run-pass-valgrind" => Some(RunPassValgrind),
48-
"pretty" => Some(Pretty),
49-
"debuginfo-lldb" => Some(DebugInfoLldb),
50-
"debuginfo-gdb" => Some(DebugInfoGdb),
51-
"codegen" => Some(Codegen),
52-
_ => None,
31+
"compile-fail" => Ok(CompileFail),
32+
"run-fail" => Ok(RunFail),
33+
"run-pass" => Ok(RunPass),
34+
"run-pass-valgrind" => Ok(RunPassValgrind),
35+
"pretty" => Ok(Pretty),
36+
"debuginfo-lldb" => Ok(DebugInfoLldb),
37+
"debuginfo-gdb" => Ok(DebugInfoGdb),
38+
"codegen" => Ok(Codegen),
39+
_ => Err(()),
5340
}
5441
}
5542
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#![feature(os)]
2424
#![feature(unicode)]
2525

26+
#![allow(unstable)]
2627
#![deny(warnings)]
2728

2829
extern crate test;
@@ -34,7 +35,6 @@ extern crate log;
3435
use std::os;
3536
use std::old_io;
3637
use std::old_io::fs;
37-
use std::str::FromStr;
3838
use std::thunk::Thunk;
3939
use getopts::{optopt, optflag, reqopt};
4040
use common::Config;
@@ -139,9 +139,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
139139
build_base: opt_path(matches, "build-base"),
140140
aux_base: opt_path(matches, "aux-base"),
141141
stage_id: matches.opt_str("stage-id").unwrap(),
142-
mode: FromStr::from_str(matches.opt_str("mode")
143-
.unwrap()
144-
.as_slice()).expect("invalid mode"),
142+
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
145143
run_ignored: matches.opt_present("ignored"),
146144
filter: filter,
147145
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct ExpectedError {
1717
pub msg: String,
1818
}
1919

20-
#[derive(PartialEq, Show)]
20+
#[derive(PartialEq, Debug)]
2121
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
2222

2323
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
352352
panic!("{}", error_string);
353353
}
354354

355-
let major: int = components[0].parse().expect(error_string);
356-
let minor: int = components[1].parse().expect(error_string);
355+
let major: int = components[0].parse().ok().expect(error_string);
356+
let minor: int = components[1].parse().ok().expect(error_string);
357357

358358
return major * 1000 + minor;
359359
}
@@ -363,6 +363,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
363363
"Encountered LLDB version string with unexpected format: {}",
364364
version_string);
365365
let error_string = error_string.as_slice();
366-
let major: int = version_string.parse().expect(error_string);
366+
let major: int = version_string.parse().ok().expect(error_string);
367367
return major;
368368
}

branches/snap-stage3/src/doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ problem might reveal someone who has asked it before!
4141
There is an active [subreddit](http://reddit.com/r/rust) with lots of
4242
discussion about Rust.
4343

44-
There is also a [developer forum](http://discuss.rust-lang.org/), where the
44+
There is also a [developer forum](http://internals.rust-lang.org/), where the
4545
development of Rust itself is discussed.
4646

4747
# Specification

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,7 @@ Some examples of call expressions:
29942994
# fn add(x: i32, y: i32) -> i32 { 0 }
29952995
29962996
let x: i32 = add(1i32, 2i32);
2997-
let pi: Option<f32> = "3.14".parse();
2997+
let pi: Option<f32> = "3.14".parse().ok();
29982998
```
29992999

30003000
### Lambda expressions

branches/snap-stage3/src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ for all but the most trivial of situations.
147147
Here's an example of using `Result`:
148148

149149
```rust
150-
#[derive(Show)]
150+
#[derive(Debug)]
151151
enum Version { Version1, Version2 }
152152

153-
#[derive(Show)]
153+
#[derive(Debug)]
154154
enum ParseError { InvalidHeaderLength, InvalidVersion }
155155

156156
fn parse_version(header: &[u8]) -> Result<Version, ParseError> {

branches/snap-stage3/src/doc/trpl/guessing-game.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ a function for that:
400400
let input = old_io::stdin().read_line()
401401
.ok()
402402
.expect("Failed to read line");
403-
let input_num: Option<u32> = input.parse();
403+
let input_num: Option<u32> = input.parse().ok();
404404
```
405405
406406
The `parse` function takes in a `&str` value and converts it into something.
@@ -422,11 +422,13 @@ In this case, we say `x` is a `u32` explicitly, so Rust is able to properly
422422
tell `random()` what to generate. In a similar fashion, both of these work:
423423
424424
```{rust,ignore}
425-
let input_num = "5".parse::<u32>(); // input_num: Option<u32>
426-
let input_num: Option<u32> = "5".parse(); // input_num: Option<u32>
425+
let input_num = "5".parse::<u32>().ok(); // input_num: Option<u32>
426+
let input_num: Option<u32> = "5".parse().ok(); // input_num: Option<u32>
427427
```
428428
429-
Anyway, with us now converting our input to a number, our code looks like this:
429+
Here we're converting the `Result` returned by `parse` to an `Option` by using
430+
the `ok` method as well. Anyway, with us now converting our input to a number,
431+
our code looks like this:
430432
431433
```{rust,ignore}
432434
use std::old_io;
@@ -445,7 +447,7 @@ fn main() {
445447
let input = old_io::stdin().read_line()
446448
.ok()
447449
.expect("Failed to read line");
448-
let input_num: Option<u32> = input.parse();
450+
let input_num: Option<u32> = input.parse().ok();
449451
450452
println!("You guessed: {}", input_num);
451453
@@ -495,7 +497,7 @@ fn main() {
495497
let input = old_io::stdin().read_line()
496498
.ok()
497499
.expect("Failed to read line");
498-
let input_num: Option<u32> = input.parse();
500+
let input_num: Option<u32> = input.parse().ok();
499501

500502
let num = match input_num {
501503
Some(num) => num,
@@ -562,7 +564,7 @@ fn main() {
562564
let input = old_io::stdin().read_line()
563565
.ok()
564566
.expect("Failed to read line");
565-
let input_num: Option<u32> = input.trim().parse();
567+
let input_num: Option<u32> = input.trim().parse().ok();
566568

567569
let num = match input_num {
568570
Some(num) => num,
@@ -638,7 +640,7 @@ fn main() {
638640
let input = old_io::stdin().read_line()
639641
.ok()
640642
.expect("Failed to read line");
641-
let input_num: Option<u32> = input.trim().parse();
643+
let input_num: Option<u32> = input.trim().parse().ok();
642644
643645
let num = match input_num {
644646
Some(num) => num,
@@ -714,7 +716,7 @@ fn main() {
714716
let input = old_io::stdin().read_line()
715717
.ok()
716718
.expect("Failed to read line");
717-
let input_num: Option<u32> = input.trim().parse();
719+
let input_num: Option<u32> = input.trim().parse().ok();
718720

719721
let num = match input_num {
720722
Some(num) => num,
@@ -770,7 +772,7 @@ fn main() {
770772
let input = old_io::stdin().read_line()
771773
.ok()
772774
.expect("Failed to read line");
773-
let input_num: Option<u32> = input.trim().parse();
775+
let input_num: Option<u32> = input.trim().parse().ok();
774776

775777
let num = match input_num {
776778
Some(num) => num,
@@ -847,7 +849,7 @@ fn main() {
847849
let input = old_io::stdin().read_line()
848850
.ok()
849851
.expect("Failed to read line");
850-
let input_num: Option<u32> = input.trim().parse();
852+
let input_num: Option<u32> = input.trim().parse().ok();
851853

852854
let num = match input_num {
853855
Some(num) => num,

branches/snap-stage3/src/doc/trpl/pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ Sometimes, you need a recursive data structure. The simplest is known as a
605605

606606

607607
```{rust}
608-
#[derive(Show)]
608+
#[derive(Debug)]
609609
enum List<T> {
610610
Cons(T, Box<List<T>>),
611611
Nil,

branches/snap-stage3/src/doc/trpl/unsafe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
576576
#[lang = "eh_personality"] extern fn eh_personality() {}
577577
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }
578578
# fn main() {}
579+
# mod std { // for-loops
580+
# pub use core::iter;
581+
# pub use core::option;
582+
# }
579583
```
580584

581585
Note that there is one extra lang item here which differs from the examples

branches/snap-stage3/src/etc/emacs/README.md

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

0 commit comments

Comments
 (0)