Skip to content

Commit 7770fd9

Browse files
committed
---
yaml --- r: 172767 b: refs/heads/try c: 3b03c20 h: refs/heads/master i: 172765: 0d4bbd2 172763: 7d945e2 172759: f723d82 172751: f7cecfc 172735: a96101b v: v3
1 parent cf2d75d commit 7770fd9

38 files changed

+203
-71
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 170c4399e614fe599c3d41306b3429ca8b3b68c6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
5-
refs/heads/try: 68ecfe0b61d85f4afbe5a25bcfc74cacdcb3ad47
5+
refs/heads/try: 3b03c20c6ddaee5ba8b9797e988af1be42d612e2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/mk/docs.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ DOCS := index intro tutorial complement-bugreport \
2929
complement-lang-faq complement-design-faq complement-project-faq \
3030
rustdoc reference
3131

32+
# Legacy guides, preserved for a while to reduce the number of 404s
33+
DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
34+
guide-ownership guide-plugins guide-pointers guide-strings guide-tasks \
35+
guide-testing
36+
37+
3238
PDF_DOCS := reference
3339

3440
RUSTDOC_DEPS_reference := doc/full-toc.inc
@@ -277,6 +283,6 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
277283

278284
trpl: doc/book/index.html
279285

280-
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
286+
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
281287
$(Q)rm -rf doc/book
282288
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book

branches/try/src/compiletest/header.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ 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,
4745
}
4846

4947
// Load any test directives embedded in the file
@@ -62,8 +60,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
6260
let mut pretty_mode = None;
6361
let mut pretty_compare_only = false;
6462
let mut forbid_output = Vec::new();
65-
let mut ignore_command_line = false;
66-
6763
iter_header(testfile, |ln| {
6864
match parse_error_pattern(ln) {
6965
Some(ep) => error_patterns.push(ep),
@@ -106,10 +102,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
106102
pretty_compare_only = parse_pretty_compare_only(ln);
107103
}
108104

109-
if !ignore_command_line {
110-
ignore_command_line = parse_ignore_command_line(ln);
111-
}
112-
113105
match parse_aux_build(ln) {
114106
Some(ab) => { aux_builds.push(ab); }
115107
None => {}
@@ -148,7 +140,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
148140
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
149141
pretty_compare_only: pretty_compare_only,
150142
forbid_output: forbid_output,
151-
ignore_command_line: ignore_command_line,
152143
}
153144
}
154145

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

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

branches/try/src/compiletest/runtest.rs

Lines changed: 2 additions & 8 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(props, expected_errors, testfile, &proc_res);
107+
check_expected_errors(expected_errors, testfile, &proc_res);
108108
} else {
109109
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
110110
}
@@ -941,8 +941,7 @@ fn check_forbid_output(props: &TestProps,
941941
}
942942
}
943943

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

@@ -997,11 +996,6 @@ fn check_expected_errors(props: &TestProps,
997996
was_expected = true;
998997
}
999998

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

branches/try/src/doc/guide-crates.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Crates and Modules Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/crates-and-modules.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% Error Handling in Rust
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/error-handling.html).

branches/try/src/doc/guide-ffi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Foreign Function Interface Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/ffi.html).

branches/try/src/doc/guide-macros.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Macros Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/macros.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Ownership Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/ownership.html).

branches/try/src/doc/guide-plugins.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Compiler Plugins Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/plugins.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Pointer Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/pointers.html).

branches/try/src/doc/guide-strings.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Guide to Rust Strings
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/strings.html).

branches/try/src/doc/guide-tasks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Threads and Communication Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/tasks.html).

branches/try/src/doc/guide-testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Testing Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/testing.html).

branches/try/src/doc/guide-unsafe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% Writing Safe Low-level and Unsafe Code in Rust
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/unsafe.html).

branches/try/src/doc/guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/README.html).

branches/try/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 cumulates
14+
Rust. It has individual sections on each part of Rust's syntax, and culminates
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 setion is full of individual,
30+
In a similar fashion to "Intermediate," this section 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/try/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 setion is full of individual,
3+
In a similar fashion to "Intermediate," this section 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: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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 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).
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/).
910

1011
Happy hacking!

branches/try/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 the dependencies your code needs. At first, your
10+
your code needs, and building those dependencies. 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/try/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/try/src/libcollections/macros.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 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,6 +12,10 @@
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+
});
1519
($($x:expr),*) => ({
1620
let xs: $crate::boxed::Box<[_]> = $crate::boxed::Box::new([$($x),*]);
1721
$crate::slice::SliceExt::into_vec(xs)

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ 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
183184
pub fn with_placeholders(pieces: &'a [&'a str],
184185
fmt: &'a [rt::Argument<'a>],
185186
args: &'a [Argument<'a>]) -> Arguments<'a> {
@@ -189,6 +190,24 @@ impl<'a> Arguments<'a> {
189190
args: args
190191
}
191192
}
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+
}
192211
}
193212

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

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

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

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

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

24+
// SNAP 9e4e524
2425
#[doc(hidden)]
2526
#[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)]
2635
pub struct Argument<'a> {
2736
pub position: Position,
2837
pub format: FormatSpec,

branches/try/src/libcore/iter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ 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]
113114
fn extend<T: Iterator<Item=A>>(&mut self, iterator: T);
114115
}
115116

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

branches/try/src/libcore/str/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,22 +1616,25 @@ impl<'a> Iterator for Lines<'a> {
16161616
fn next(&mut self) -> Option<&'a str> { self.inner.next() }
16171617
#[inline]
16181618
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
1619+
}
16191620

1620-
#[stable]}
1621+
#[stable]
16211622
impl<'a> DoubleEndedIterator for Lines<'a> {
16221623
#[inline]
16231624
fn next_back(&mut self) -> Option<&'a str> { self.inner.next_back() }
1625+
}
16241626

1625-
#[stable]}
1627+
#[stable]
16261628
impl<'a> Iterator for LinesAny<'a> {
16271629
type Item = &'a str;
16281630

16291631
#[inline]
16301632
fn next(&mut self) -> Option<&'a str> { self.inner.next() }
16311633
#[inline]
16321634
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
1635+
}
16331636

1634-
#[stable]}
1637+
#[stable]
16351638
impl<'a> DoubleEndedIterator for LinesAny<'a> {
16361639
#[inline]
16371640
fn next_back(&mut self) -> Option<&'a str> { self.inner.next_back() }

branches/try/src/libsyntax/diagnostic.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub use self::RenderSpan::*;
1313
pub use self::ColorConfig::*;
1414
use self::Destination::*;
1515

16-
use codemap::{COMMAND_LINE_SP, Pos, Span};
16+
use codemap::{COMMAND_LINE_SP, COMMAND_LINE_EXPN, Pos, Span};
1717
use codemap;
1818
use diagnostics;
1919

@@ -393,7 +393,10 @@ impl Emitter for EmitterWriter {
393393
fn emit(dst: &mut EmitterWriter, cm: &codemap::CodeMap, rsp: RenderSpan,
394394
msg: &str, code: Option<&str>, lvl: Level, custom: bool) -> io::IoResult<()> {
395395
let sp = rsp.span();
396-
let ss = if sp == COMMAND_LINE_SP {
396+
397+
// We cannot check equality directly with COMMAND_LINE_SP
398+
// since PartialEq is manually implemented to ignore the ExpnId
399+
let ss = if sp.expn_id == COMMAND_LINE_EXPN {
397400
"<command line option>".to_string()
398401
} else {
399402
cm.span_to_string(sp)

branches/try/src/libsyntax/ext/format.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,9 @@ impl<'a, 'b> Context<'a, 'b> {
579579
} else {
580580
// Build up the static array which will store our precompiled
581581
// nonstandard placeholders, if there are any.
582-
let piece_ty = self.ecx.ty_path(self.ecx.path_all(
582+
let piece_ty = self.ecx.ty_path(self.ecx.path_global(
583583
self.fmtsp,
584-
true, Context::rtpath(self.ecx, "Argument"),
585-
vec![static_lifetime],
586-
vec![],
587-
vec![]
588-
));
584+
Context::rtpath(self.ecx, "Argument")));
589585
let fmt = Context::static_array(self.ecx,
590586
"__STATIC_FMTARGS",
591587
piece_ty,

0 commit comments

Comments
 (0)