Skip to content

Commit 55093e7

Browse files
committed
---
yaml --- r: 177407 b: refs/heads/tmp c: 2c6440e h: refs/heads/master i: 177405: ebc3cbd 177403: 763bca0 177399: 48d81b8 177391: d39f6cf 177375: f81b54c 177343: a530956 177279: 7adac7b 177151: 2639e11 v: v3
1 parent 16f2c77 commit 55093e7

File tree

764 files changed

+6745
-9134
lines changed

Some content is hidden

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

764 files changed

+6745
-9134
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 265a23320dbeaeca45b889cfea684d71dec1b8e6
37+
refs/heads/tmp: 2c6440e2a2b725807c54e713c7f472b4df4a9218

branches/tmp/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]>

branches/tmp/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).

branches/tmp/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

branches/tmp/mk/tests.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ tidy:
301301
| grep '^$(S)src/rust-installer' -v \
302302
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303303
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
304-
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
305304

306305

307306
endif

branches/tmp/src/compiletest/common.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ pub use self::Mode::*;
1212
use std::fmt;
1313
use std::str::FromStr;
1414

15-
#[derive(Clone, Copy, PartialEq, Debug)]
15+
#[cfg(stage0)] // NOTE: remove impl after snapshot
16+
#[derive(Clone, PartialEq, Show)]
1617
pub enum Mode {
1718
CompileFail,
1819
RunFail,
@@ -24,6 +25,22 @@ pub enum Mode {
2425
Codegen
2526
}
2627

28+
#[cfg(not(stage0))] // NOTE: remove cfg after snapshot
29+
#[derive(Clone, PartialEq, Debug)]
30+
pub enum Mode {
31+
CompileFail,
32+
RunFail,
33+
RunPass,
34+
RunPassValgrind,
35+
Pretty,
36+
DebugInfoGdb,
37+
DebugInfoLldb,
38+
Codegen
39+
}
40+
41+
42+
impl Copy for Mode {}
43+
2744
impl FromStr for Mode {
2845
fn from_str(s: &str) -> Option<Mode> {
2946
match s {

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,8 @@
1313
#![feature(slicing_syntax, unboxed_closures)]
1414
#![feature(box_syntax)]
1515
#![feature(int_uint)]
16-
#![feature(test)]
17-
#![feature(rustc_private)]
18-
#![feature(std_misc)]
19-
#![feature(path)]
20-
#![feature(io)]
21-
#![feature(core)]
22-
#![feature(collections)]
23-
#![feature(os)]
24-
#![feature(unicode)]
25-
2616
#![allow(unstable)]
17+
2718
#![deny(warnings)]
2819

2920
extern crate test;
@@ -370,8 +361,8 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
370361
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
371362
match full_version_line {
372363
Some(ref full_version_line)
373-
if full_version_line.trim().len() > 0 => {
374-
let full_version_line = full_version_line.trim();
364+
if full_version_line.as_slice().trim().len() > 0 => {
365+
let full_version_line = full_version_line.as_slice().trim();
375366

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

411402
match full_version_line {
412403
Some(ref full_version_line)
413-
if full_version_line.trim().len() > 0 => {
414-
let full_version_line = full_version_line.trim();
404+
if full_version_line.as_slice().trim().len() > 0 => {
405+
let full_version_line = full_version_line.as_slice().trim();
415406

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

branches/tmp/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"

branches/tmp/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
}

branches/tmp/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),

branches/tmp/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

branches/tmp/src/doc/reference.md

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,8 +1680,8 @@ specific type.
16801680
Implementations are defined with the keyword `impl`.
16811681

16821682
```
1683-
# #[derive(Copy)]
16841683
# struct Point {x: f64, y: f64};
1684+
# impl Copy for Point {}
16851685
# type Surface = i32;
16861686
# struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
16871687
# trait Shape { fn draw(&self, Surface); fn bounding_box(&self) -> BoundingBox; }
@@ -2219,7 +2219,7 @@ For any lint check `C`:
22192219

22202220
The lint checks supported by the compiler can be found via `rustc -W help`,
22212221
along with their default settings. [Compiler
2222-
plugins](book/plugins.html#lint-plugins) can provide additional lint checks.
2222+
plugins](book/plugin.html#lint-plugins) can provide additional lint checks.
22232223

22242224
```{.ignore}
22252225
mod m1 {
@@ -2359,6 +2359,77 @@ Supported traits for `derive` are:
23592359
* `Show`, to format a value using the `{}` formatter.
23602360
* `Zero`, to create a zero instance of a numeric data type.
23612361

2362+
### Stability
2363+
2364+
One can indicate the stability of an API using the following attributes:
2365+
2366+
* `deprecated`: This item should no longer be used, e.g. it has been
2367+
replaced. No guarantee of backwards-compatibility.
2368+
* `experimental`: This item was only recently introduced or is
2369+
otherwise in a state of flux. It may change significantly, or even
2370+
be removed. No guarantee of backwards-compatibility.
2371+
* `unstable`: This item is still under development, but requires more
2372+
testing to be considered stable. No guarantee of backwards-compatibility.
2373+
* `stable`: This item is considered stable, and will not change
2374+
significantly. Guarantee of backwards-compatibility.
2375+
* `frozen`: This item is very stable, and is unlikely to
2376+
change. Guarantee of backwards-compatibility.
2377+
* `locked`: This item will never change unless a serious bug is
2378+
found. Guarantee of backwards-compatibility.
2379+
2380+
These levels are directly inspired by
2381+
[Node.js' "stability index"](http://nodejs.org/api/documentation.html).
2382+
2383+
Stability levels are inherited, so an item's stability attribute is the default
2384+
stability for everything nested underneath it.
2385+
2386+
There are lints for disallowing items marked with certain levels: `deprecated`,
2387+
`experimental` and `unstable`. For now, only `deprecated` warns by default, but
2388+
this will change once the standard library has been stabilized. Stability
2389+
levels are meant to be promises at the crate level, so these lints only apply
2390+
when referencing items from an _external_ crate, not to items defined within
2391+
the current crate. Items with no stability level are considered to be unstable
2392+
for the purposes of the lint. One can give an optional string that will be
2393+
displayed when the lint flags the use of an item.
2394+
2395+
For example, if we define one crate called `stability_levels`:
2396+
2397+
```{.ignore}
2398+
#[deprecated="replaced by `best`"]
2399+
pub fn bad() {
2400+
// delete everything
2401+
}
2402+
2403+
pub fn better() {
2404+
// delete fewer things
2405+
}
2406+
2407+
#[stable]
2408+
pub fn best() {
2409+
// delete nothing
2410+
}
2411+
```
2412+
2413+
then the lints will work as follows for a client crate:
2414+
2415+
```{.ignore}
2416+
#![warn(unstable)]
2417+
extern crate stability_levels;
2418+
use stability_levels::{bad, better, best};
2419+
2420+
fn main() {
2421+
bad(); // "warning: use of deprecated item: replaced by `best`"
2422+
2423+
better(); // "warning: use of unmarked item"
2424+
2425+
best(); // no warning
2426+
}
2427+
```
2428+
2429+
> **Note:** Currently these are only checked when applied to individual
2430+
> functions, structs, methods and enum variants, *not* to entire modules,
2431+
> traits, impls or enums themselves.
2432+
23622433
### Compiler Features
23632434

23642435
Certain aspects of Rust may be implemented in the compiler, but they're not
@@ -4163,4 +4234,4 @@ that have since been removed):
41634234
pattern syntax
41644235

41654236
[ffi]: book/ffi.html
4166-
[plugin]: book/plugins.html
4237+
[plugin]: book/plugin.html

branches/tmp/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> {

branches/tmp/src/doc/trpl/more-strings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,5 @@ Many more bytes than graphemes!
279279

280280
# Other Documentation
281281

282-
* [the `&str` API documentation](../std/str/index.html)
283-
* [the `String` API documentation](../std/string/index.html)
282+
* [the `&str` API documentation](std/str/index.html)
283+
* [the `String` API documentation](std/string/index.html)

branches/tmp/src/doc/trpl/ownership.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
533533
fn get_str() -> &str; // ILLEGAL, no inputs
534534
535535
fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
536-
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear
537536
538537
fn get_mut(&mut self) -> &mut T; // elided
539538
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded

branches/tmp/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,

branches/tmp/src/driver/driver.rs

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

11-
#![allow(unknown_features)]
12-
#![cfg_attr(rustc, feature(rustc_private))]
13-
#![cfg_attr(rustdoc, feature(rustdoc))]
11+
#![allow(unstable)]
1412

1513
#[cfg(rustdoc)]
1614
extern crate "rustdoc" as this;

0 commit comments

Comments
 (0)