Skip to content

Commit bf0fb65

Browse files
committed
---
yaml --- r: 172855 b: refs/heads/try c: 3a44a19 h: refs/heads/master i: 172853: 82c7631 172851: be9ee99 172847: 2d39f11 v: v3
1 parent 3c0787d commit bf0fb65

File tree

234 files changed

+2946
-1055
lines changed

Some content is hidden

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

234 files changed

+2946
-1055
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: f82c75b0a7e7fd56c6915187ce03f0d9f657563a
5+
refs/heads/try: 3a44a19af29585c02e81e22ea7665f829ae0590a
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: 13 additions & 9 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

@@ -967,6 +966,16 @@ fn check_expected_errors(props: &TestProps,
967966
line.starts_with( prefix )
968967
}
969968

969+
// A multi-line error will have followup lines which will always
970+
// start with one of these strings.
971+
fn continuation( line: &str) -> bool {
972+
line.starts_with(" expected") ||
973+
line.starts_with(" found") ||
974+
// 1234
975+
// Should have 4 spaces: see issue 18946
976+
line.starts_with("(")
977+
}
978+
970979
// Scan and extract our error/warning messages,
971980
// which look like:
972981
// filename:line1:col1: line2:col2: *error:* msg
@@ -982,7 +991,7 @@ fn check_expected_errors(props: &TestProps,
982991
ee.kind,
983992
ee.msg,
984993
line);
985-
if prefix_matches(line, prefixes[i].as_slice()) &&
994+
if (prefix_matches(line, prefixes[i].as_slice()) || continuation(line)) &&
986995
line.contains(ee.kind.as_slice()) &&
987996
line.contains(ee.msg.as_slice()) {
988997
found_flags[i] = true;
@@ -997,11 +1006,6 @@ fn check_expected_errors(props: &TestProps,
9971006
was_expected = true;
9981007
}
9991008

1000-
if line.starts_with("<command line option>") &&
1001-
props.ignore_command_line {
1002-
was_expected = true;
1003-
}
1004-
10051009
if !was_expected && is_compiler_error_or_warning(line) {
10061010
fatal_proc_rec(format!("unexpected compiler error or warning: '{}'",
10071011
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/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ use semver::Version;
106106
107107
fn main() {
108108
assert!(Version::parse("1.2.3") == Ok(Version {
109-
major: 1u,
110-
minor: 2u,
111-
patch: 3u,
109+
major: 1u64,
110+
minor: 2u64,
111+
patch: 3u64,
112112
pre: vec!(),
113113
build: vec!(),
114114
}));

0 commit comments

Comments
 (0)