Skip to content

Commit 32b8225

Browse files
committed
---
yaml --- r: 273403 b: refs/heads/beta c: 0694d63 h: refs/heads/master i: 273401: d36a3b7 273399: 277919b
1 parent ae01476 commit 32b8225

File tree

255 files changed

+7439
-7130
lines changed

Some content is hidden

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

255 files changed

+7439
-7130
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 2318e9fbe2caf7c2cc7bf63cf4ea244d274ba16b
26+
refs/heads/beta: 0694d636740b21a2dc80468364ee81156031ac63
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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
120-
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(0)`.
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)`.
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/beta/configure

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ 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"
610611

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

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

branches/beta/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)
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)
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
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/beta/mk/main.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ 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+
137142
ifdef SAVE_TEMPS
138143
CFG_RUSTC_FLAGS += --save-temps
139144
endif

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ 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 assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
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+
}
4348

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

branches/beta/src/compiletest/header.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ 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)> ,
3436
// Environment settings to use during execution
3537
pub exec_env: Vec<(String,String)> ,
3638
// Lines to check if they appear in the expected debugger output
@@ -77,6 +79,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
7779
pp_exact: pp_exact,
7880
aux_builds: aux_builds,
7981
revisions: vec![],
82+
rustc_env: vec![],
8083
exec_env: exec_env,
8184
check_lines: check_lines,
8285
build_aux_docs: build_aux_docs,
@@ -153,10 +156,14 @@ pub fn load_props_into(props: &mut TestProps, testfile: &Path, cfg: Option<&str>
153156
props.aux_builds.push(ab);
154157
}
155158

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

163+
if let Some(ee) = parse_env(ln, "rustc-env") {
164+
props.rustc_env.push(ee);
165+
}
166+
160167
if let Some(cl) = parse_check_line(ln) {
161168
props.check_lines.push(cl);
162169
}
@@ -372,8 +379,8 @@ fn parse_pretty_compare_only(line: &str) -> bool {
372379
parse_name_directive(line, "pretty-compare-only")
373380
}
374381

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

branches/beta/src/compiletest/runtest.rs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,28 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
863863
"-g".to_owned(),
864864
"--debuginfo".to_owned()
865865
];
866-
let new_options =
866+
let mut new_options =
867867
split_maybe_args(options).into_iter()
868868
.filter(|x| !options_to_remove.contains(x))
869-
.collect::<Vec<String>>()
870-
.join(" ");
871-
Some(new_options)
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(" "))
872888
}
873889

874890
fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String]) {
@@ -1009,6 +1025,10 @@ fn check_expected_errors(revision: Option<&str>,
10091025
expected.replace(r"\", "/")
10101026
}).collect::<Vec<String>>();
10111027

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.
10121032
let (expect_help, expect_note) =
10131033
expected_errors.iter()
10141034
.fold((false, false),
@@ -1386,7 +1406,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
13861406
compose_and_run(config,
13871407
testpaths,
13881408
args,
1389-
Vec::new(),
1409+
props.rustc_env.clone(),
13901410
&config.compile_lib_path,
13911411
Some(aux_dir.to_str().unwrap()),
13921412
input)

branches/beta/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/beta/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 (ythe integer), and then we return it on the
915+
the unwrapped `Ok` value (the 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/beta/src/doc/book/references-and-borrowing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ both at the same time:
163163
* exactly one mutable reference (`&mut T`).
164164

165165

166-
You may notice that this is very similar, though not exactly the same as,
167-
to the definition of a data race:
166+
You may notice that this is very similar to, though not exactly the same as,
167+
the definition of a data race:
168168

169169
> There is a ‘data race’ when two or more pointers access the same memory
170170
> location at the same time, where at least one of them is writing, and the

branches/beta/src/doc/book/variable-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function, rather than leaving it off. Otherwise, you’ll get an error.
1818

1919
In many languages, a variable binding would be called a *variable*, but Rust’s
2020
variable bindings have a few tricks up their sleeves. For example the
21-
left-hand side of a `let` expression is a ‘[pattern][pattern]’, not a
21+
left-hand side of a `let` statement is a ‘[pattern][pattern]’, not a
2222
variable name. This means we can do things like:
2323

2424
```rust
2525
let (x, y) = (1, 2);
2626
```
2727

28-
After this expression is evaluated, `x` will be one, and `y` will be two.
28+
After this statement is evaluated, `x` will be one, and `y` will be two.
2929
Patterns are really powerful, and have [their own section][pattern] in the
3030
book. We don’t need those features for now, so we’ll keep this in the back
3131
of our minds as we go forward.

branches/beta/src/libcore/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["The Rust Project Developers"]
33
name = "core"
44
version = "0.0.0"
5+
build = "build.rs"
56

67
[lib]
78
name = "core"
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2016 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
//
@@ -7,17 +7,8 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
//
11-
// error-pattern:already defined
12-
13-
14-
#![allow(warnings)]
1510

1611
fn main() {
17-
{
18-
extern fn fail() {}
19-
}
20-
{
21-
extern fn fail() {}
22-
}
12+
// Remove this whenever snapshots and rustbuild nightlies are synced.
13+
println!("cargo:rustc-cfg=cargobuild");
2314
}

branches/beta/src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option<usize> {
416416
///
417417
/// [`escape_unicode()`]: ../../std/primitive.char.html#method.escape_unicode
418418
/// [`char`]: ../../std/primitive.char.html
419-
#[derive(Clone)]
419+
#[derive(Clone, Debug)]
420420
#[stable(feature = "rust1", since = "1.0.0")]
421421
pub struct EscapeUnicode {
422422
c: char,
423423
state: EscapeUnicodeState
424424
}
425425

426-
#[derive(Clone)]
426+
#[derive(Clone, Debug)]
427427
enum EscapeUnicodeState {
428428
Backslash,
429429
Type,
@@ -496,13 +496,13 @@ impl Iterator for EscapeUnicode {
496496
///
497497
/// [`escape_default()`]: ../../std/primitive.char.html#method.escape_default
498498
/// [`char`]: ../../std/primitive.char.html
499-
#[derive(Clone)]
499+
#[derive(Clone, Debug)]
500500
#[stable(feature = "rust1", since = "1.0.0")]
501501
pub struct EscapeDefault {
502502
state: EscapeDefaultState
503503
}
504504

505-
#[derive(Clone)]
505+
#[derive(Clone, Debug)]
506506
enum EscapeDefaultState {
507507
Backslash(char),
508508
Char(char),

branches/beta/src/libcore/cmp.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@
1414
//! by the compiler to implement comparison operators. Rust programs may
1515
//! implement `PartialOrd` to overload the `<`, `<=`, `>`, and `>=` operators,
1616
//! and may implement `PartialEq` to overload the `==` and `!=` operators.
17+
//!
18+
//! # Examples
19+
//!
20+
//! ```
21+
//! let x: u32 = 0;
22+
//! let y: u32 = 1;
23+
//!
24+
//! // these two lines are equivalent
25+
//! assert_eq!(x < y, true);
26+
//! assert_eq!(x.lt(&y), true);
27+
//!
28+
//! // these two lines are also equivalent
29+
//! assert_eq!(x == y, false);
30+
//! assert_eq!(x.eq(&y), false);
31+
//! ```
1732
1833
#![stable(feature = "rust1", since = "1.0.0")]
1934

@@ -44,6 +59,16 @@ use option::Option::{self, Some};
4459
/// only if `a != b`.
4560
///
4661
/// This trait can be used with `#[derive]`.
62+
///
63+
/// # Examples
64+
///
65+
/// ```
66+
/// let x: u32 = 0;
67+
/// let y: u32 = 1;
68+
///
69+
/// assert_eq!(x == y, false);
70+
/// assert_eq!(x.eq(&y), false);
71+
/// ```
4772
#[lang = "eq"]
4873
#[stable(feature = "rust1", since = "1.0.0")]
4974
pub trait PartialEq<Rhs: ?Sized = Self> {
@@ -226,6 +251,16 @@ impl PartialOrd for Ordering {
226251
///
227252
/// This trait can be used with `#[derive]`. When `derive`d, it will produce an ordering
228253
/// based on the top-to-bottom declaration order of the struct's members.
254+
///
255+
/// # Examples
256+
///
257+
/// ```
258+
/// let x : u32 = 0;
259+
/// let y : u32 = 1;
260+
///
261+
/// assert_eq!(x < y, true);
262+
/// assert_eq!(x.lt(&y), true);
263+
/// ```
229264
#[lang = "ord"]
230265
#[stable(feature = "rust1", since = "1.0.0")]
231266
pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {

branches/beta/src/libcore/fmt/builders.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl<'a, 'b: 'a> fmt::Write for PadAdapter<'a, 'b> {
5454
///
5555
/// Constructed by the `Formatter::debug_struct` method.
5656
#[must_use]
57+
#[allow(missing_debug_implementations)]
5758
#[stable(feature = "debug_builders", since = "1.2.0")]
5859
pub struct DebugStruct<'a, 'b: 'a> {
5960
fmt: &'a mut fmt::Formatter<'b>,
@@ -120,6 +121,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
120121
///
121122
/// Constructed by the `Formatter::debug_tuple` method.
122123
#[must_use]
124+
#[allow(missing_debug_implementations)]
123125
#[stable(feature = "debug_builders", since = "1.2.0")]
124126
pub struct DebugTuple<'a, 'b: 'a> {
125127
fmt: &'a mut fmt::Formatter<'b>,
@@ -231,6 +233,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
231233
///
232234
/// Constructed by the `Formatter::debug_set` method.
233235
#[must_use]
236+
#[allow(missing_debug_implementations)]
234237
#[stable(feature = "debug_builders", since = "1.2.0")]
235238
pub struct DebugSet<'a, 'b: 'a> {
236239
inner: DebugInner<'a, 'b>,
@@ -279,6 +282,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
279282
///
280283
/// Constructed by the `Formatter::debug_list` method.
281284
#[must_use]
285+
#[allow(missing_debug_implementations)]
282286
#[stable(feature = "debug_builders", since = "1.2.0")]
283287
pub struct DebugList<'a, 'b: 'a> {
284288
inner: DebugInner<'a, 'b>,
@@ -327,6 +331,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
327331
///
328332
/// Constructed by the `Formatter::debug_map` method.
329333
#[must_use]
334+
#[allow(missing_debug_implementations)]
330335
#[stable(feature = "debug_builders", since = "1.2.0")]
331336
pub struct DebugMap<'a, 'b: 'a> {
332337
fmt: &'a mut fmt::Formatter<'b>,

0 commit comments

Comments
 (0)