Skip to content

Commit bb94a72

Browse files
committed
---
yaml --- r: 177508 b: refs/heads/master c: 947f6ca h: refs/heads/master v: v3
1 parent 030724f commit bb94a72

File tree

494 files changed

+2760
-3620
lines changed

Some content is hidden

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

494 files changed

+2760
-3620
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: 103f1459c00e66c7326f8d332f04f5b546c033c6
2+
refs/heads/master: 947f6ca4a1b8a3decc535963addb67864b988277
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a45e117733b866302fa99390553d1c548508dcca
55
refs/heads/try: fde4472848b662a4d1236388c4cf15e2450237e6

trunk/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-
Orpheus Lummis <o@orpheuslummis.com>
519+
Orphée Lafond-Lummis <o@orftz.com>
520520
521521
Pablo Brasero <[email protected]>
522522
Palmer Cox <[email protected]>

trunk/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-
[internals.rust-lang.org][internals], and
53+
[discuss.rust-lang.org][discuss], and
5454
[#rust-internals][pound-rust-internals].
5555

5656
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
57-
[internals]: http://internals.rust-lang.org
57+
[discuss]: http://discuss.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).

trunk/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/rustc-nightly-src.tar.gz
34-
$ tar -xzf rustc-nightly-src.tar.gz
35-
$ cd rustc-nightly
33+
$ curl -O https://static.rust-lang.org/dist/rust-nightly.tar.gz
34+
$ tar -xzf rust-nightly.tar.gz
35+
$ cd rust-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/rustc-nightly-src.tar.gz
83+
[tarball]: https://static.rust-lang.org/dist/rust-nightly.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-
* [internals.rust-lang.org] - For development of the Rust language itself.
115+
* [discuss.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-
[internals.rust-lang.org]: http://internals.rust-lang.org/
119+
[discuss.rust-lang.org]: http://discuss.rust-lang.org/
120120

121121
## License
122122

trunk/src/compiletest/common.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ 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
1529
#[derive(Clone, Copy, PartialEq, Debug)]
1630
pub enum Mode {
1731
CompileFail,

trunk/src/compiletest/compiletest.rs

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

26-
#![allow(unstable)]
2726
#![deny(warnings)]
2827

2928
extern crate test;
@@ -370,8 +369,8 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
370369
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
371370
match full_version_line {
372371
Some(ref full_version_line)
373-
if full_version_line.trim().len() > 0 => {
374-
let full_version_line = full_version_line.trim();
372+
if full_version_line.as_slice().trim().len() > 0 => {
373+
let full_version_line = full_version_line.as_slice().trim();
375374

376375
// used to be a regex "(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)"
377376
for (pos, c) in full_version_line.char_indices() {
@@ -410,8 +409,8 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
410409

411410
match full_version_line {
412411
Some(ref full_version_line)
413-
if full_version_line.trim().len() > 0 => {
414-
let full_version_line = full_version_line.trim();
412+
if full_version_line.as_slice().trim().len() > 0 => {
413+
let full_version_line = full_version_line.as_slice().trim();
415414

416415
for (pos, l) in full_version_line.char_indices() {
417416
if l != 'l' && l != 'L' { continue }

trunk/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, Debug)]
20+
#[derive(PartialEq, Show)]
2121
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
2222

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

trunk/src/compiletest/header.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
149149
}
150150
fn ignore_stage(config: &Config) -> String {
151151
format!("ignore-{}",
152-
config.stage_id.split('-').next().unwrap())
152+
config.stage_id.as_slice().split('-').next().unwrap())
153153
}
154154
fn ignore_gdb(config: &Config, line: &str) -> bool {
155155
if config.mode != common::DebugInfoGdb {
@@ -231,11 +231,11 @@ fn iter_header<F>(testfile: &Path, mut it: F) -> bool where
231231
// module or function. This doesn't seem to be an optimization
232232
// with a warm page cache. Maybe with a cold one.
233233
let ln = ln.unwrap();
234-
if ln.starts_with("fn") ||
235-
ln.starts_with("mod") {
234+
if ln.as_slice().starts_with("fn") ||
235+
ln.as_slice().starts_with("mod") {
236236
return true;
237237
} else {
238-
if !(it(ln.trim())) {
238+
if !(it(ln.as_slice().trim())) {
239239
return false;
240240
}
241241
}

trunk/src/compiletest/runtest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
777777
for line in reader.lines() {
778778
match line {
779779
Ok(line) => {
780-
if line.contains("#break") {
780+
if line.as_slice().contains("#break") {
781781
breakpoint_lines.push(counter);
782782
}
783783

@@ -843,7 +843,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
843843
// check if each line in props.check_lines appears in the
844844
// output (in order)
845845
let mut i = 0u;
846-
for line in debugger_run_result.stdout.lines() {
846+
for line in debugger_run_result.stdout.as_slice().lines() {
847847
let mut rest = line.trim();
848848
let mut first = true;
849849
let mut failed = false;
@@ -895,7 +895,7 @@ fn check_error_patterns(props: &TestProps,
895895
let mut next_err_idx = 0u;
896896
let mut next_err_pat = &props.error_patterns[next_err_idx];
897897
let mut done = false;
898-
for line in output_to_check.lines() {
898+
for line in output_to_check.as_slice().lines() {
899899
if line.contains(next_err_pat.as_slice()) {
900900
debug!("found error pattern {}", next_err_pat);
901901
next_err_idx += 1u;
@@ -924,7 +924,7 @@ fn check_error_patterns(props: &TestProps,
924924
}
925925

926926
fn check_no_compiler_crash(proc_res: &ProcRes) {
927-
for line in proc_res.stderr.lines() {
927+
for line in proc_res.stderr.as_slice().lines() {
928928
if line.starts_with("error: internal compiler error:") {
929929
fatal_proc_rec("compiler encountered internal error",
930930
proc_res);
@@ -983,7 +983,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
983983
// filename:line1:col1: line2:col2: *warning:* msg
984984
// where line1:col1: is the starting point, line2:col2:
985985
// is the ending point, and * represents ANSI color codes.
986-
for line in proc_res.stderr.lines() {
986+
for line in proc_res.stderr.as_slice().lines() {
987987
let mut was_expected = false;
988988
for (i, ee) in expected_errors.iter().enumerate() {
989989
if !found_flags[i] {
@@ -1536,7 +1536,7 @@ fn _arm_exec_compiled_test(config: &Config,
15361536
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
15371537

15381538
let mut exitcode: int = 0;
1539-
for c in exitcode_out.chars() {
1539+
for c in exitcode_out.as_slice().chars() {
15401540
if !c.is_numeric() { break; }
15411541
exitcode = exitcode * 10 + match c {
15421542
'0' ... '9' => c as int - ('0' as int),

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

4747
# Specification

trunk/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(Debug)]
150+
#[derive(Show)]
151151
enum Version { Version1, Version2 }
152152

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

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

trunk/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(Debug)]
608+
#[derive(Show)]
609609
enum List<T> {
610610
Cons(T, Box<List<T>>),
611611
Nil,

trunk/src/doc/trpl/unsafe.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,6 @@ 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-
# }
583579
```
584580

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

trunk/src/etc/local_stage0.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@ case $OS in
2121
("Linux"|"FreeBSD"|"DragonFly")
2222
BIN_SUF=
2323
LIB_SUF=.so
24+
break
2425
;;
2526
("Darwin")
2627
BIN_SUF=
2728
LIB_SUF=.dylib
29+
break
2830
;;
2931
(*)
3032
BIN_SUF=.exe
3133
LIB_SUF=.dll
3234
LIB_DIR=bin
3335
LIB_PREFIX=
36+
break
3437
;;
3538
esac
3639

trunk/src/grammar/verify.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
4343
None => continue
4444
};
4545

46-
let val = &line[..eq];
47-
let num = &line[eq + 1..];
46+
let val = line.slice_to(eq);
47+
let num = line.slice_from(eq + 1);
4848

4949
let tok = match val {
5050
"SHR" => token::BinOp(token::Shr),
@@ -136,27 +136,27 @@ fn str_to_binop(s: &str) -> token::BinOpToken {
136136
fn fix(mut lit: &str) -> ast::Name {
137137
if lit.char_at(0) == 'r' {
138138
if lit.char_at(1) == 'b' {
139-
lit = &lit[2..]
139+
lit = lit.slice_from(2)
140140
} else {
141-
lit = &lit[1..];
141+
lit = lit.slice_from(1);
142142
}
143143
} else if lit.char_at(0) == 'b' {
144-
lit = &lit[1..];
144+
lit = lit.slice_from(1);
145145
}
146146

147147
let leading_hashes = count(lit);
148148

149149
// +1/-1 to adjust for single quotes
150-
parse::token::intern(&lit[leading_hashes + 1..lit.len() - leading_hashes - 1])
150+
parse::token::intern(lit.slice(leading_hashes + 1, lit.len() - leading_hashes - 1))
151151
}
152152

153153
/// Assuming a char/byte literal, strip the 'b' prefix and the single quotes.
154154
fn fixchar(mut lit: &str) -> ast::Name {
155155
if lit.char_at(0) == 'b' {
156-
lit = &lit[1..];
156+
lit = lit.slice_from(1);
157157
}
158158

159-
parse::token::intern(&lit[1..lit.len() - 1])
159+
parse::token::intern(lit.slice(1, lit.len() - 1))
160160
}
161161

162162
fn count(lit: &str) -> usize {
@@ -187,7 +187,8 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>) -> TokenAn
187187

188188
let real_tok = match *proto_tok {
189189
token::BinOp(..) => token::BinOp(str_to_binop(content)),
190-
token::BinOpEq(..) => token::BinOpEq(str_to_binop(&content[..content.len() - 1])),
190+
token::BinOpEq(..) => token::BinOpEq(str_to_binop(content.slice_to(
191+
content.len() - 1))),
191192
token::Literal(token::Str_(..), n) => token::Literal(token::Str_(fix(content)), n),
192193
token::Literal(token::StrRaw(..), n) => token::Literal(token::StrRaw(fix(content),
193194
count(content)), n),
@@ -248,7 +249,7 @@ fn main() {
248249
let mut stdin = std::io::stdin();
249250
let mut lock = stdin.lock();
250251
let lines = lock.lines();
251-
let mut antlr_tokens = lines.map(|l| parse_antlr_token(l.unwrap().trim(),
252+
let mut antlr_tokens = lines.map(|l| parse_antlr_token(l.unwrap().as_slice().trim(),
252253
&token_map));
253254

254255
let code = File::open(&Path::new(args[1].as_slice())).unwrap().read_to_string().unwrap();

trunk/src/liballoc/arc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//!
3838
//! let five = Arc::new(5i);
3939
//!
40-
//! for _ in 0u..10 {
40+
//! for _ in range(0u, 10) {
4141
//! let five = five.clone();
4242
//!
4343
//! Thread::spawn(move || {
@@ -54,7 +54,7 @@
5454
//!
5555
//! let five = Arc::new(Mutex::new(5i));
5656
//!
57-
//! for _ in 0u..10 {
57+
//! for _ in range(0u, 10) {
5858
//! let five = five.clone();
5959
//!
6060
//! Thread::spawn(move || {
@@ -95,10 +95,10 @@ use heap::deallocate;
9595
/// use std::thread::Thread;
9696
///
9797
/// fn main() {
98-
/// let numbers: Vec<_> = (0..100u32).map(|i| i as f32).collect();
98+
/// let numbers: Vec<_> = range(0, 100u32).map(|i| i as f32).collect();
9999
/// let shared_numbers = Arc::new(numbers);
100100
///
101-
/// for _ in 0u..10 {
101+
/// for _ in range(0u, 10) {
102102
/// let child_numbers = shared_numbers.clone();
103103
///
104104
/// Thread::spawn(move || {
@@ -814,6 +814,6 @@ mod tests {
814814
}
815815

816816
// Make sure deriving works with Arc<T>
817-
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Debug, Default)]
817+
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)]
818818
struct Foo { inner: Arc<int> }
819819
}

trunk/src/liballoc/boxed.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! Creating a recursive data structure:
3030
//!
3131
//! ```
32-
//! #[derive(Debug)]
32+
//! #[derive(Show)]
3333
//! enum List<T> {
3434
//! Cons(T, Box<List<T>>),
3535
//! Nil,
@@ -250,6 +250,8 @@ impl<T: ?Sized> DerefMut for Box<T> {
250250
fn deref_mut(&mut self) -> &mut T { &mut **self }
251251
}
252252

253+
// FIXME(#21363) remove `old_impl_check` when bug is fixed
254+
#[old_impl_check]
253255
impl<'a, T> Iterator for Box<Iterator<Item=T> + 'a> {
254256
type Item = T;
255257

trunk/src/liballoc/heap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[cfg(not(test))]
1211
use core::ptr::PtrExt;
1312

1413
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`

0 commit comments

Comments
 (0)