Skip to content

Commit 4840ee1

Browse files
author
Julian Orth
committed
---
yaml --- r: 172478 b: refs/heads/auto c: a03ae68 h: refs/heads/master v: v3
1 parent 3c249ee commit 4840ee1

33 files changed

+95
-202
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 71a71ce4f948dd5ae792db4a88c9cc2fae94dfb0
13+
refs/heads/auto: a03ae681d3f52ca6a6aaf7ebfd32a51af6d4e4da
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/header.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub struct TestProps {
4242
pub pretty_compare_only: bool,
4343
// Patterns which must not appear in the output of a cfail test.
4444
pub forbid_output: Vec<String>,
45+
// Ignore errors which originate from a command line span
46+
pub ignore_command_line: bool,
4547
}
4648

4749
// Load any test directives embedded in the file
@@ -60,6 +62,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
6062
let mut pretty_mode = None;
6163
let mut pretty_compare_only = false;
6264
let mut forbid_output = Vec::new();
65+
let mut ignore_command_line = false;
66+
6367
iter_header(testfile, |ln| {
6468
match parse_error_pattern(ln) {
6569
Some(ep) => error_patterns.push(ep),
@@ -102,6 +106,10 @@ pub fn load_props(testfile: &Path) -> TestProps {
102106
pretty_compare_only = parse_pretty_compare_only(ln);
103107
}
104108

109+
if !ignore_command_line {
110+
ignore_command_line = parse_ignore_command_line(ln);
111+
}
112+
105113
match parse_aux_build(ln) {
106114
Some(ab) => { aux_builds.push(ab); }
107115
None => {}
@@ -140,6 +148,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
140148
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
141149
pretty_compare_only: pretty_compare_only,
142150
forbid_output: forbid_output,
151+
ignore_command_line: ignore_command_line,
143152
}
144153
}
145154

@@ -291,6 +300,10 @@ fn parse_pretty_compare_only(line: &str) -> bool {
291300
parse_name_directive(line, "pretty-compare-only")
292301
}
293302

303+
fn parse_ignore_command_line(line: &str) -> bool {
304+
parse_name_directive(line, "ignore-command-line")
305+
}
306+
294307
fn parse_exec_env(line: &str) -> Option<(String, String)> {
295308
parse_name_value_directive(line, "exec-env").map(|nv| {
296309
// nv is either FOO or FOO=BAR

branches/auto/src/compiletest/runtest.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
104104
if !props.error_patterns.is_empty() {
105105
fatal("both error pattern and expected errors specified");
106106
}
107-
check_expected_errors(expected_errors, testfile, &proc_res);
107+
check_expected_errors(props, expected_errors, testfile, &proc_res);
108108
} else {
109109
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
110110
}
@@ -941,7 +941,8 @@ fn check_forbid_output(props: &TestProps,
941941
}
942942
}
943943

944-
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
944+
fn check_expected_errors(props: &TestProps,
945+
expected_errors: Vec<errors::ExpectedError> ,
945946
testfile: &Path,
946947
proc_res: &ProcRes) {
947948

@@ -996,6 +997,11 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
996997
was_expected = true;
997998
}
998999

1000+
if line.starts_with("<command line option>") &&
1001+
props.ignore_command_line {
1002+
was_expected = true;
1003+
}
1004+
9991005
if !was_expected && is_compiler_error_or_warning(line) {
10001006
fatal_proc_rec(format!("unexpected compiler error or warning: '{}'",
10011007
line).as_slice(),

branches/auto/src/doc/trpl/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ navigate through the menu on the left.
1111
## Basics
1212

1313
This section is a linear introduction to the basic syntax and semantics of
14-
Rust. It has individual sections on each part of Rust's syntax, and culminates
14+
Rust. It has individual sections on each part of Rust's syntax, and cumulates
1515
in a small project: a guessing game.
1616

1717
After reading "Basics," you will have a good foundation to learn more about
@@ -27,7 +27,7 @@ and will be able to understand most Rust code and write more complex programs.
2727

2828
## Advanced
2929

30-
In a similar fashion to "Intermediate," this section is full of individual,
30+
In a similar fashion to "Intermediate," this setion is full of individual,
3131
deep-dive chapters, which stand alone and can be read in any order. These
3232
chapters focus on the most complex features, as well as some things that
3333
are only available in upcoming versions of Rust.

branches/auto/src/doc/trpl/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Advanced
22

3-
In a similar fashion to "Intermediate," this section is full of individual,
3+
In a similar fashion to "Intermediate," this setion is full of individual,
44
deep-dive chapters, which stand alone and can be read in any order. These
55
chapters focus on the most complex features, as well as some things that
66
are only available in upcoming versions of Rust.
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
% Conclusion
22

33
We covered a lot of ground here. When you've mastered everything in this Guide,
4-
you will have a firm grasp of Rust development. There's a whole lot more
5-
out there, though, we've just covered the surface. There's tons of topics that
6-
you can dig deeper into, e.g. by reading the API documentation of the
7-
[standard library](http://doc.rust-lang.org/std/), by discovering solutions for
8-
common problems on [Rust by Example](http://rustbyexample.com/), or by browsing
9-
crates written by the community on [crates.io](https://crates.io/).
4+
you will have a firm grasp of basic Rust development. There's a whole lot more
5+
out there, we've just covered the surface. There's tons of topics that you can
6+
dig deeper into, and we've built specialized guides for many of them. To learn
7+
more, dig into the [full documentation
8+
index](index.html).
109

1110
Happy hacking!

branches/auto/src/doc/trpl/hello-cargo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Rust projects, and so it is assumed that Rust projects will use Cargo from the
77
beginning.
88

99
Cargo manages three things: building your code, downloading the dependencies
10-
your code needs, and building those dependencies. At first, your
10+
your code needs, and building the dependencies your code needs. At first, your
1111
program doesn't have any dependencies, so we'll only be using the first part of
1212
its functionality. Eventually, we'll add more. Since we started off by using
1313
Cargo, it'll be easy to add later.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Here are the three rules:
488488
parameter.
489489

490490
* If there is exactly one input lifetime, elided or not, that lifetime is
491-
assigned to all elided lifetimes in the return values of that function.
491+
assigned to all elided lifetimes in the return values of that function..
492492

493493
* If there are multiple input lifetimes, but one of them is `&self` or `&mut
494494
self`, the lifetime of `self` is assigned to all elided output lifetimes.

branches/auto/src/doc/trpl/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ extern crate adder;
309309
310310
#[test]
311311
fn it_works() {
312-
assert_eq!(4, adder::add_two(2));
312+
assert_eq(4, adder::add_two(2));
313313
}
314314
```
315315

branches/auto/src/libcollections/macros.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -12,10 +12,6 @@
1212
#[macro_export]
1313
#[stable]
1414
macro_rules! vec {
15-
($x:expr; $y:expr) => ({
16-
let xs: $crate::boxed::Box<[_]> = $crate::boxed::Box::new([$x; $y]);
17-
$crate::slice::SliceExt::into_vec(xs)
18-
});
1915
($($x:expr),*) => ({
2016
let xs: $crate::boxed::Box<[_]> = $crate::boxed::Box::new([$($x),*]);
2117
$crate::slice::SliceExt::into_vec(xs)

branches/auto/src/libcollections/string.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ impl String {
302302
/// assert_eq!(String::from_utf16_lossy(v),
303303
/// "𝄞mus\u{FFFD}ic\u{FFFD}".to_string());
304304
/// ```
305+
#[inline]
305306
#[stable]
306307
pub fn from_utf16_lossy(v: &[u16]) -> String {
307308
unicode_str::utf16_items(v).map(|c| c.to_char_lossy()).collect()
@@ -556,6 +557,7 @@ impl String {
556557
/// assert_eq!(s.remove(1), 'o');
557558
/// assert_eq!(s.remove(0), 'o');
558559
/// ```
560+
#[inline]
559561
#[stable]
560562
pub fn remove(&mut self, idx: uint) -> char {
561563
let len = self.len();
@@ -582,6 +584,7 @@ impl String {
582584
///
583585
/// If `idx` does not lie on a character boundary or is out of bounds, then
584586
/// this function will panic.
587+
#[inline]
585588
#[stable]
586589
pub fn insert(&mut self, idx: uint, ch: char) {
587590
let len = self.len();
@@ -618,6 +621,7 @@ impl String {
618621
/// }
619622
/// assert_eq!(s.as_slice(), "olleh");
620623
/// ```
624+
#[inline]
621625
#[stable]
622626
pub unsafe fn as_mut_vec<'a>(&'a mut self) -> &'a mut Vec<u8> {
623627
&mut self.vec
@@ -645,6 +649,7 @@ impl String {
645649
/// v.push('a');
646650
/// assert!(!v.is_empty());
647651
/// ```
652+
#[inline]
648653
#[stable]
649654
pub fn is_empty(&self) -> bool { self.len() == 0 }
650655

@@ -801,6 +806,7 @@ impl Str for String {
801806

802807
#[stable]
803808
impl Default for String {
809+
#[inline]
804810
#[stable]
805811
fn default() -> String {
806812
String::new()
@@ -809,13 +815,15 @@ impl Default for String {
809815

810816
#[stable]
811817
impl fmt::String for String {
818+
#[inline]
812819
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
813820
fmt::String::fmt(&**self, f)
814821
}
815822
}
816823

817824
#[unstable = "waiting on fmt stabilization"]
818825
impl fmt::Show for String {
826+
#[inline]
819827
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
820828
fmt::Show::fmt(&**self, f)
821829
}
@@ -842,6 +850,7 @@ impl<H: hash::Writer + hash::Hasher> hash::Hash<H> for String {
842850
impl<'a> Add<&'a str> for String {
843851
type Output = String;
844852

853+
#[inline]
845854
fn add(mut self, other: &str) -> String {
846855
self.push_str(other);
847856
self
@@ -881,6 +890,7 @@ impl ops::Index<ops::FullRange> for String {
881890
impl ops::Deref for String {
882891
type Target = str;
883892

893+
#[inline]
884894
fn deref<'a>(&'a self) -> &'a str {
885895
unsafe { mem::transmute(&self.vec[]) }
886896
}
@@ -895,6 +905,7 @@ pub struct DerefString<'a> {
895905
impl<'a> Deref for DerefString<'a> {
896906
type Target = String;
897907

908+
#[inline]
898909
fn deref<'b>(&'b self) -> &'b String {
899910
unsafe { mem::transmute(&*self.x) }
900911
}
@@ -933,6 +944,7 @@ pub trait ToString {
933944
}
934945

935946
impl<T: fmt::String + ?Sized> ToString for T {
947+
#[inline]
936948
fn to_string(&self) -> String {
937949
use core::fmt::Writer;
938950
let mut buf = String::new();
@@ -943,12 +955,14 @@ impl<T: fmt::String + ?Sized> ToString for T {
943955
}
944956

945957
impl IntoCow<'static, String, str> for String {
958+
#[inline]
946959
fn into_cow(self) -> CowString<'static> {
947960
Cow::Owned(self)
948961
}
949962
}
950963

951964
impl<'a> IntoCow<'a, String, str> for &'a str {
965+
#[inline]
952966
fn into_cow(self) -> CowString<'a> {
953967
Cow::Borrowed(self)
954968
}
@@ -966,6 +980,7 @@ impl<'a> Str for CowString<'a> {
966980
}
967981

968982
impl fmt::Writer for String {
983+
#[inline]
969984
fn write_str(&mut self, s: &str) -> fmt::Result {
970985
self.push_str(s);
971986
Ok(())

branches/auto/src/libcore/fmt/mod.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ impl<'a> Arguments<'a> {
180180
/// unsafety, but will ignore invalid .
181181
#[doc(hidden)] #[inline]
182182
#[unstable = "implementation detail of the `format_args!` macro"]
183-
#[cfg(stage0)] // SNAP 9e4e524
184183
pub fn with_placeholders(pieces: &'a [&'a str],
185184
fmt: &'a [rt::Argument<'a>],
186185
args: &'a [Argument<'a>]) -> Arguments<'a> {
@@ -190,24 +189,6 @@ impl<'a> Arguments<'a> {
190189
args: args
191190
}
192191
}
193-
/// This function is used to specify nonstandard formatting parameters.
194-
/// The `pieces` array must be at least as long as `fmt` to construct
195-
/// a valid Arguments structure. Also, any `Count` within `fmt` that is
196-
/// `CountIsParam` or `CountIsNextParam` has to point to an argument
197-
/// created with `argumentuint`. However, failing to do so doesn't cause
198-
/// unsafety, but will ignore invalid .
199-
#[doc(hidden)] #[inline]
200-
#[unstable = "implementation detail of the `format_args!` macro"]
201-
#[cfg(not(stage0))]
202-
pub fn with_placeholders(pieces: &'a [&'a str],
203-
fmt: &'a [rt::Argument],
204-
args: &'a [Argument<'a>]) -> Arguments<'a> {
205-
Arguments {
206-
pieces: pieces,
207-
fmt: Some(fmt),
208-
args: args
209-
}
210-
}
211192
}
212193

213194
/// This structure represents a safely precompiled version of a format string
@@ -226,11 +207,7 @@ pub struct Arguments<'a> {
226207
pieces: &'a [&'a str],
227208

228209
// Placeholder specs, or `None` if all specs are default (as in "{}{}").
229-
// SNAP 9e4e524
230-
#[cfg(stage0)]
231210
fmt: Option<&'a [rt::Argument<'a>]>,
232-
#[cfg(not(stage0))]
233-
fmt: Option<&'a [rt::Argument]>,
234211

235212
// Dynamic arguments for interpolation, to be interleaved with string
236213
// pieces. (Every argument is preceded by a string piece.)

branches/auto/src/libcore/fmt/rt.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,8 @@ pub use self::Count::*;
2121
pub use self::Position::*;
2222
pub use self::Flag::*;
2323

24-
// SNAP 9e4e524
2524
#[doc(hidden)]
2625
#[derive(Copy)]
27-
#[cfg(not(stage0))]
28-
pub struct Argument {
29-
pub position: Position,
30-
pub format: FormatSpec,
31-
}
32-
#[doc(hidden)]
33-
#[derive(Copy)]
34-
#[cfg(stage0)]
3526
pub struct Argument<'a> {
3627
pub position: Position,
3728
pub format: FormatSpec,

branches/auto/src/libcore/iter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ pub trait FromIterator<A> {
110110
#[stable]
111111
pub trait Extend<A> {
112112
/// Extend a container with the elements yielded by an arbitrary iterator
113-
#[stable]
114113
fn extend<T: Iterator<Item=A>>(&mut self, iterator: T);
115114
}
116115

@@ -966,7 +965,6 @@ impl<I> IteratorExt for I where I: Iterator {}
966965
#[stable]
967966
pub trait DoubleEndedIterator: Iterator {
968967
/// Yield an element from the end of the range, returning `None` if the range is empty.
969-
#[stable]
970968
fn next_back(&mut self) -> Option<Self::Item>;
971969
}
972970

0 commit comments

Comments
 (0)