Skip to content

Commit 99878c9

Browse files
committed
---
yaml --- r: 271383 b: refs/heads/auto c: 985cddf h: refs/heads/master i: 271381: 30d4004 271379: e22db37 271375: 89aae86
1 parent 156223f commit 99878c9

File tree

276 files changed

+7237
-7717
lines changed

Some content is hidden

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

276 files changed

+7237
-7717
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 2ae05d37dac364cfcbb3cf3a2490ea8b7116f04c
11+
refs/heads/auto: 985cddf518a05446f80be3b4febc20c6653f5554
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build.
7777
7878
Download [MinGW from
7979
here](http://mingw-w64.org/doku.php/download/mingw-builds), and choose the
80-
`version=4.9.x,threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
80+
`threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
8181
add its `bin` directory to your `PATH`. This is due to [#28260](https://github.com/rust-lang/rust/issues/28260), in the future,
8282
installing from pacman should be just fine.
8383

branches/auto/RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Compatibility Notes
116116
that were not intended. In this release, [defaulted type parameters
117117
appearing outside of type definitions will generate a
118118
warning][1.7d], which will become an error in future releases.
119-
* [Parsing "." as a float results in an error instead of 0][1.7p].
120-
That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
119+
* [Parsing "." as a float results in an error instead of
120+
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(0)`.
121121
* [Borrows of closure parameters may not outlive the closure][1.7bc].
122122

123123
[1.7a]: https://github.com/rust-lang/rust/pull/30928

branches/auto/configure

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ opt dist-host-only 0 "only install bins for the host architecture"
607607
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
608608
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609609
opt rustbuild 0 "use the rust and cargo based build system"
610-
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
611610

612611
# Optimization and debugging options. These may be overridden by the release channel, etc.
613612
opt_nosave optimize 1 "build optimized rust code"
@@ -714,8 +713,6 @@ if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTION
714713
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
715714
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
716715

717-
if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
718-
719716
# A magic value that allows the compiler to use unstable features
720717
# during the bootstrap even when doing so would normally be an error
721718
# because of feature staging or because the build turns on

branches/auto/mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
77
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
88
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS) -march=pentium
11-
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) -march=pentium
12-
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) -march=pentium
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
1313
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
1414
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
1515
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=

branches/auto/mk/main.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ ifdef CFG_ENABLE_DEBUGINFO
134134
CFG_RUSTC_FLAGS += -g
135135
endif
136136

137-
ifdef CFG_ENABLE_ORBIT
138-
$(info cfg: launching MIR (CFG_ENABLE_ORBIT))
139-
CFG_RUSTC_FLAGS += -Z orbit
140-
endif
141-
142137
ifdef SAVE_TEMPS
143138
CFG_RUSTC_FLAGS += --save-temps
144139
endif

branches/auto/src/bootstrap/build/native.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ pub fn llvm(build: &Build, target: &str) {
3939

4040
let _ = fs::remove_dir_all(&dst.join("build"));
4141
t!(fs::create_dir_all(&dst.join("build")));
42-
let mut assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
43-
44-
// Disable LLVM assertions on ARM compilers until #32360 is fixed
45-
if target.contains("arm") && target.contains("gnu") {
46-
assertions = "OFF";
47-
}
42+
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
4843

4944
// http://llvm.org/docs/CMake.html
5045
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));
@@ -119,8 +114,7 @@ pub fn compiler_rt(build: &Build, target: &str) {
119114
let arch = target.split('-').next().unwrap();
120115
let mode = if build.config.rust_optimize {"Release"} else {"Debug"};
121116
let (dir, build_target, libname) = if target.contains("linux") ||
122-
target.contains("freebsd") ||
123-
target.contains("netbsd") {
117+
target.contains("freebsd") {
124118
let os = if target.contains("android") {"-android"} else {""};
125119
let arch = if arch.starts_with("arm") && target.contains("eabihf") {
126120
"armhf"

branches/auto/src/compiletest/errors.rs

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,54 @@
99
// except according to those terms.
1010
use self::WhichLine::*;
1111

12+
use std::fmt;
1213
use std::fs::File;
1314
use std::io::BufReader;
1415
use std::io::prelude::*;
1516
use std::path::Path;
17+
use std::str::FromStr;
18+
19+
#[derive(Clone, Debug, PartialEq)]
20+
pub enum ErrorKind {
21+
Help,
22+
Error,
23+
Note,
24+
Suggestion,
25+
Warning,
26+
}
27+
28+
impl FromStr for ErrorKind {
29+
type Err = ();
30+
fn from_str(s: &str) -> Result<Self, Self::Err> {
31+
match &s.trim_right_matches(':') as &str {
32+
"HELP" => Ok(ErrorKind::Help),
33+
"ERROR" => Ok(ErrorKind::Error),
34+
"NOTE" => Ok(ErrorKind::Note),
35+
"SUGGESTION" => Ok(ErrorKind::Suggestion),
36+
"WARN" => Ok(ErrorKind::Warning),
37+
"WARNING" => Ok(ErrorKind::Warning),
38+
_ => Err(()),
39+
}
40+
}
41+
}
42+
43+
impl fmt::Display for ErrorKind {
44+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
45+
match *self {
46+
ErrorKind::Help => write!(f, "help"),
47+
ErrorKind::Error => write!(f, "error"),
48+
ErrorKind::Note => write!(f, "note"),
49+
ErrorKind::Suggestion => write!(f, "suggestion"),
50+
ErrorKind::Warning => write!(f, "warning"),
51+
}
52+
}
53+
}
1654

1755
pub struct ExpectedError {
1856
pub line_num: usize,
19-
pub kind: String,
57+
/// What kind of message we expect (e.g. warning, error, suggestion).
58+
/// `None` if not specified or unknown message kind.
59+
pub kind: Option<ErrorKind>,
2060
pub msg: String,
2161
}
2262

@@ -84,8 +124,9 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
84124
let letters = line[kind_start..].chars();
85125
let kind = letters.skip_while(|c| c.is_whitespace())
86126
.take_while(|c| !c.is_whitespace())
87-
.flat_map(|c| c.to_lowercase())
88-
.collect::<String>();
127+
.collect::<String>()
128+
.parse::<ErrorKind>()
129+
.ok();
89130
let letters = line[kind_start..].chars();
90131
let msg = letters.skip_while(|c| c.is_whitespace())
91132
.skip_while(|c| !c.is_whitespace())

branches/auto/src/compiletest/header.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ pub struct TestProps {
3131
pub pp_exact: Option<PathBuf>,
3232
// Modules from aux directory that should be compiled
3333
pub aux_builds: Vec<String> ,
34-
// Environment settings to use for compiling
35-
pub rustc_env: Vec<(String,String)> ,
3634
// Environment settings to use during execution
3735
pub exec_env: Vec<(String,String)> ,
3836
// Lines to check if they appear in the expected debugger output
@@ -79,7 +77,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
7977
pp_exact: pp_exact,
8078
aux_builds: aux_builds,
8179
revisions: vec![],
82-
rustc_env: vec![],
8380
exec_env: exec_env,
8481
check_lines: check_lines,
8582
build_aux_docs: build_aux_docs,
@@ -156,14 +153,10 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path, cfg: Option<&str>
156153
props.aux_builds.push(ab);
157154
}
158155

159-
if let Some(ee) = parse_env(ln, "exec-env") {
156+
if let Some(ee) = parse_exec_env(ln) {
160157
props.exec_env.push(ee);
161158
}
162159

163-
if let Some(ee) = parse_env(ln, "rustc-env") {
164-
props.rustc_env.push(ee);
165-
}
166-
167160
if let Some(cl) = parse_check_line(ln) {
168161
props.check_lines.push(cl);
169162
}
@@ -379,8 +372,8 @@ fn parse_pretty_compare_only(line: &str) -> bool {
379372
parse_name_directive(line, "pretty-compare-only")
380373
}
381374

382-
fn parse_env(line: &str, name: &str) -> Option<(String, String)> {
383-
parse_name_value_directive(line, name).map(|nv| {
375+
fn parse_exec_env(line: &str) -> Option<(String, String)> {
376+
parse_name_value_directive(line, "exec-env").map(|nv| {
384377
// nv is either FOO or FOO=BAR
385378
let mut strs: Vec<String> = nv
386379
.splitn(2, '=')

branches/auto/src/compiletest/runtest.rs

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use common::Config;
1212
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
1313
use common::{Codegen, DebugInfoLldb, DebugInfoGdb, Rustdoc, CodegenUnits};
14-
use errors;
14+
use errors::{self, ErrorKind};
1515
use header::TestProps;
1616
use header;
1717
use procsrv;
@@ -863,28 +863,12 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
863863
"-g".to_owned(),
864864
"--debuginfo".to_owned()
865865
];
866-
let mut new_options =
866+
let new_options =
867867
split_maybe_args(options).into_iter()
868868
.filter(|x| !options_to_remove.contains(x))
869-
.collect::<Vec<String>>();
870-
871-
let mut i = 0;
872-
while i + 1 < new_options.len() {
873-
if new_options[i] == "-Z" {
874-
// FIXME #31005 MIR missing debuginfo currently.
875-
if new_options[i + 1] == "orbit" {
876-
// Remove "-Z" and "orbit".
877-
new_options.remove(i);
878-
new_options.remove(i);
879-
continue;
880-
}
881-
// Always skip over -Z's argument.
882-
i += 1;
883-
}
884-
i += 1;
885-
}
886-
887-
Some(new_options.join(" "))
869+
.collect::<Vec<String>>()
870+
.join(" ");
871+
Some(new_options)
888872
}
889873

890874
fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String]) {
@@ -1025,16 +1009,12 @@ fn check_expected_errors(revision: Option<&str>,
10251009
expected.replace(r"\", "/")
10261010
}).collect::<Vec<String>>();
10271011

1028-
// If the testcase being checked contains at least one expected "help"
1029-
// message, then we'll ensure that all "help" messages are expected.
1030-
// Otherwise, all "help" messages reported by the compiler will be ignored.
1031-
// This logic also applies to "note" messages.
10321012
let (expect_help, expect_note) =
10331013
expected_errors.iter()
10341014
.fold((false, false),
10351015
|(acc_help, acc_note), ee|
1036-
(acc_help || ee.kind == "help:" || ee.kind == "help",
1037-
acc_note || ee.kind == "note:" || ee.kind == "note"));
1016+
(acc_help || ee.kind == Some(ErrorKind::Help),
1017+
acc_note || ee.kind == Some(ErrorKind::Note)));
10381018

10391019
// Scan and extract our error/warning messages,
10401020
// which look like:
@@ -1052,15 +1032,15 @@ fn check_expected_errors(revision: Option<&str>,
10521032
let mut prev = 0;
10531033
for (i, ee) in expected_errors.iter().enumerate() {
10541034
if !found_flags[i] {
1055-
debug!("prefix={} ee.kind={} ee.msg={} line={}",
1035+
debug!("prefix={} ee.kind={:?} ee.msg={} line={}",
10561036
prefixes[i],
10571037
ee.kind,
10581038
ee.msg,
10591039
line);
10601040
// Suggestions have no line number in their output, so take on the line number of
10611041
// the previous expected error
1062-
if ee.kind == "suggestion" {
1063-
assert!(expected_errors[prev].kind == "help",
1042+
if ee.kind == Some(ErrorKind::Suggestion) {
1043+
assert!(expected_errors[prev].kind == Some(ErrorKind::Help),
10641044
"SUGGESTIONs must be preceded by a HELP");
10651045
if line.contains(&ee.msg) {
10661046
found_flags[i] = true;
@@ -1070,7 +1050,7 @@ fn check_expected_errors(revision: Option<&str>,
10701050
}
10711051
if
10721052
(prefix_matches(line, &prefixes[i]) || continuation(line)) &&
1073-
line.contains(&ee.kind) &&
1053+
(ee.kind.is_none() || line.contains(&ee.kind.as_ref().unwrap().to_string())) &&
10741054
line.contains(&ee.msg)
10751055
{
10761056
found_flags[i] = true;
@@ -1096,7 +1076,10 @@ fn check_expected_errors(revision: Option<&str>,
10961076
if !flag {
10971077
let ee = &expected_errors[i];
10981078
error(revision, &format!("expected {} on line {} not found: {}",
1099-
ee.kind, ee.line_num, ee.msg));
1079+
ee.kind.as_ref()
1080+
.map_or("message".into(),
1081+
|k| k.to_string()),
1082+
ee.line_num, ee.msg));
11001083
not_found += 1;
11011084
}
11021085
}
@@ -1406,7 +1389,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
14061389
compose_and_run(config,
14071390
testpaths,
14081391
args,
1409-
props.rustc_env.clone(),
1392+
Vec::new(),
14101393
&config.compile_lib_path,
14111394
Some(aux_dir.to_str().unwrap()),
14121395
input)

branches/auto/src/doc/book/error-handling.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,16 +2019,6 @@ impl Error for CliError {
20192019
CliError::NotFound => "not found",
20202020
}
20212021
}
2022-
2023-
fn cause(&self) -> Option<&error::Error> {
2024-
match *self {
2025-
CliError::Io(ref err) => Some(err),
2026-
CliError::Parse(ref err) => Some(err),
2027-
// Our custom error doesn't have an underlying cause, but we could
2028-
// modify it so that it does.
2029-
CliError::NotFound() => None,
2030-
}
2031-
}
20322022
}
20332023
```
20342024

branches/auto/src/doc/book/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ unofficial locations.
9393
| `armv7-apple-ios` || | | ARM iOS |
9494
| `armv7s-apple-ios` || | | ARM iOS |
9595
| `aarch64-apple-ios` || | | ARM64 iOS |
96-
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97-
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
96+
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97+
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
9898
| `x86_64-unknown-openbsd` ||| | 64-bit OpenBSD |
9999
| `x86_64-unknown-netbsd` ||| | 64-bit NetBSD |
100100
| `x86_64-unknown-bitrig` ||| | 64-bit Bitrig |

branches/auto/src/doc/book/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ returned by `parse()`, this is an `enum` like `Ordering`, but in this case,
912912
each variant has some data associated with it: `Ok` is a success, and `Err` is a
913913
failure. Each contains more information: the successfully parsed integer, or an
914914
error type. In this case, we `match` on `Ok(num)`, which sets the name `num` to
915-
the unwrapped `Ok` value (the integer), and then we return it on the
915+
the unwrapped `Ok` value (ythe integer), and then we return it on the
916916
right-hand side. In the `Err` case, we don’t care what kind of error it is, so
917917
we just use the catch all `_` instead of a name. This catches everything that
918918
isn't `Ok`, and `continue` lets us move to the next iteration of the loop; in

branches/auto/src/doc/book/match.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ give us an error:
3636
error: non-exhaustive patterns: `_` not covered
3737
```
3838

39-
Rust is telling us that we forgot some value. The compiler infers from `x` that it
40-
can have any 32bit integer value; for example -2,147,483,648 to 2,147,483,647. The `_` acts
39+
Rust is telling us that we forgot a value. The compiler infers from `x` that it
40+
can have any positive 32bit value; for example 1 to 2,147,483,647. The `_` acts
4141
as a 'catch-all', and will catch all possible values that *aren't* specified in
42-
an arm of `match`. As you can see in the previous example, we provide `match`
42+
an arm of `match`. As you can see with the previous example, we provide `match`
4343
arms for integers 1-5, if `x` is 6 or any other value, then it is caught by `_`.
4444

4545
`match` is also an expression, which means we can use it on the right-hand

branches/auto/src/doc/book/primitive-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ of these ones, as well, but these are the most primitive.
77

88
# Booleans
99

10-
Rust has a built-in boolean type, named `bool`. It has two values, `true` and `false`:
10+
Rust has a built in boolean type, named `bool`. It has two values, `true` and `false`:
1111

1212
```rust
1313
let x = true;
@@ -89,13 +89,13 @@ Unsigned types use a `u` for their category, and signed types use `i`. The `i`
8989
is for ‘integer’. So `u8` is an eight-bit unsigned number, and `i8` is an
9090
eight-bit signed number.
9191

92-
## Fixed-size types
92+
## Fixed size types
9393

94-
Fixed-size types have a specific number of bits in their representation. Valid
94+
Fixed size types have a specific number of bits in their representation. Valid
9595
bit sizes are `8`, `16`, `32`, and `64`. So, `u32` is an unsigned, 32-bit integer,
9696
and `i64` is a signed, 64-bit integer.
9797

98-
## Variable-size types
98+
## Variable sized types
9999

100100
Rust also provides types whose size depends on the size of a pointer of the
101101
underlying machine. These types have ‘size’ as the category, and come in signed

0 commit comments

Comments
 (0)