Skip to content

Commit 6bfa9ef

Browse files
committed
---
yaml --- r: 273389 b: refs/heads/beta c: 7ec8f5c h: refs/heads/master i: 273387: 5bcc1ec
1 parent d0e4ec6 commit 6bfa9ef

File tree

95 files changed

+2469
-707
lines changed

Some content is hidden

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

95 files changed

+2469
-707
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: e0945937c4d6786af0b03a11c8cec2c34cde7662
26+
refs/heads/beta: 7ec8f5c3699bf16c452cff6abaeda26abaeef02c
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/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/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/runtest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,10 @@ fn check_expected_errors(revision: Option<&str>,
10251025
expected.replace(r"\", "/")
10261026
}).collect::<Vec<String>>();
10271027

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.
10281032
let (expect_help, expect_note) =
10291033
expected_errors.iter()
10301034
.fold((false, false),

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"

branches/beta/src/libcore/build.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn main() {
12+
// Remove this whenever snapshots and rustbuild nightlies are synced.
13+
println!("cargo:rustc-cfg=cargobuild");
14+
}

branches/beta/src/libcore/intrinsics.rs

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,37 +53,44 @@ extern "rust-intrinsic" {
5353
// NB: These intrinsics take raw pointers because they mutate aliased
5454
// memory, which is not valid for either `&` or `&mut`.
5555

56+
#[cfg(all(stage0, not(cargobuild)))]
5657
pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> T;
58+
#[cfg(all(stage0, not(cargobuild)))]
5759
pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> T;
60+
#[cfg(all(stage0, not(cargobuild)))]
5861
pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> T;
62+
#[cfg(all(stage0, not(cargobuild)))]
5963
pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> T;
64+
#[cfg(all(stage0, not(cargobuild)))]
6065
pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> T;
61-
#[cfg(not(stage0))]
62-
pub fn atomic_cxchg_failrelaxed<T>(dst: *mut T, old: T, src: T) -> T;
63-
#[cfg(not(stage0))]
64-
pub fn atomic_cxchg_failacq<T>(dst: *mut T, old: T, src: T) -> T;
65-
#[cfg(not(stage0))]
66-
pub fn atomic_cxchg_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> T;
67-
#[cfg(not(stage0))]
68-
pub fn atomic_cxchg_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> T;
6966

70-
#[cfg(not(stage0))]
67+
#[cfg(any(not(stage0), cargobuild))]
68+
pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> (T, bool);
69+
#[cfg(any(not(stage0), cargobuild))]
70+
pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
71+
#[cfg(any(not(stage0), cargobuild))]
72+
pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
73+
#[cfg(any(not(stage0), cargobuild))]
74+
pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
75+
#[cfg(any(not(stage0), cargobuild))]
76+
pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
77+
#[cfg(any(not(stage0), cargobuild))]
78+
pub fn atomic_cxchg_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
79+
#[cfg(any(not(stage0), cargobuild))]
80+
pub fn atomic_cxchg_failacq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
81+
#[cfg(any(not(stage0), cargobuild))]
82+
pub fn atomic_cxchg_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
83+
#[cfg(any(not(stage0), cargobuild))]
84+
pub fn atomic_cxchg_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
85+
7186
pub fn atomic_cxchgweak<T>(dst: *mut T, old: T, src: T) -> (T, bool);
72-
#[cfg(not(stage0))]
7387
pub fn atomic_cxchgweak_acq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
74-
#[cfg(not(stage0))]
7588
pub fn atomic_cxchgweak_rel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
76-
#[cfg(not(stage0))]
7789
pub fn atomic_cxchgweak_acqrel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
78-
#[cfg(not(stage0))]
7990
pub fn atomic_cxchgweak_relaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
80-
#[cfg(not(stage0))]
8191
pub fn atomic_cxchgweak_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
82-
#[cfg(not(stage0))]
8392
pub fn atomic_cxchgweak_failacq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
84-
#[cfg(not(stage0))]
8593
pub fn atomic_cxchgweak_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
86-
#[cfg(not(stage0))]
8794
pub fn atomic_cxchgweak_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
8895

8996
pub fn atomic_load<T>(src: *const T) -> T;
@@ -539,6 +546,32 @@ extern "rust-intrinsic" {
539546
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
540547
pub fn roundf64(x: f64) -> f64;
541548

549+
/// Float addition that allows optimizations based on algebraic rules.
550+
/// May assume inputs are finite.
551+
#[cfg(not(stage0))]
552+
pub fn fadd_fast<T>(a: T, b: T) -> T;
553+
554+
/// Float subtraction that allows optimizations based on algebraic rules.
555+
/// May assume inputs are finite.
556+
#[cfg(not(stage0))]
557+
pub fn fsub_fast<T>(a: T, b: T) -> T;
558+
559+
/// Float multiplication that allows optimizations based on algebraic rules.
560+
/// May assume inputs are finite.
561+
#[cfg(not(stage0))]
562+
pub fn fmul_fast<T>(a: T, b: T) -> T;
563+
564+
/// Float division that allows optimizations based on algebraic rules.
565+
/// May assume inputs are finite.
566+
#[cfg(not(stage0))]
567+
pub fn fdiv_fast<T>(a: T, b: T) -> T;
568+
569+
/// Float remainder that allows optimizations based on algebraic rules.
570+
/// May assume inputs are finite.
571+
#[cfg(not(stage0))]
572+
pub fn frem_fast<T>(a: T, b: T) -> T;
573+
574+
542575
/// Returns the number of bits set in an integer type `T`
543576
pub fn ctpop<T>(x: T) -> T;
544577

branches/beta/src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#![feature(const_fn)]
6666
#![feature(custom_attribute)]
6767
#![feature(fundamental)]
68+
#![feature(inclusive_range_syntax)]
6869
#![feature(intrinsics)]
6970
#![feature(lang_items)]
7071
#![feature(no_core)]

branches/beta/src/libcore/num/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ macro_rules! int_impl {
10081008
/// ```
10091009
#[stable(feature = "rust1", since = "1.0.0")]
10101010
#[inline]
1011-
#[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
1011+
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
10121012
pub fn pow(self, mut exp: u32) -> Self {
10131013
let mut base = self;
10141014
let mut acc = Self::one();
@@ -1050,7 +1050,7 @@ macro_rules! int_impl {
10501050
/// ```
10511051
#[stable(feature = "rust1", since = "1.0.0")]
10521052
#[inline]
1053-
#[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
1053+
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
10541054
pub fn abs(self) -> Self {
10551055
if self.is_negative() {
10561056
// Note that the #[inline] above means that the overflow
@@ -2015,7 +2015,7 @@ macro_rules! uint_impl {
20152015
/// ```
20162016
#[stable(feature = "rust1", since = "1.0.0")]
20172017
#[inline]
2018-
#[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
2018+
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
20192019
pub fn pow(self, mut exp: u32) -> Self {
20202020
let mut base = self;
20212021
let mut acc = Self::one();

branches/beta/src/libcore/ops.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,6 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
14481448

14491449
/// An unbounded range.
14501450
#[derive(Copy, Clone, PartialEq, Eq)]
1451-
#[cfg_attr(stage0, lang = "range_full")] // FIXME remove attribute after next snapshot
14521451
#[stable(feature = "rust1", since = "1.0.0")]
14531452
pub struct RangeFull;
14541453

@@ -1461,7 +1460,6 @@ impl fmt::Debug for RangeFull {
14611460

14621461
/// A (half-open) range which is bounded at both ends.
14631462
#[derive(Clone, PartialEq, Eq)]
1464-
#[cfg_attr(stage0, lang = "range")] // FIXME remove attribute after next snapshot
14651463
#[stable(feature = "rust1", since = "1.0.0")]
14661464
pub struct Range<Idx> {
14671465
/// The lower bound of the range (inclusive).
@@ -1481,7 +1479,6 @@ impl<Idx: fmt::Debug> fmt::Debug for Range<Idx> {
14811479

14821480
/// A range which is only bounded below.
14831481
#[derive(Clone, PartialEq, Eq)]
1484-
#[cfg_attr(stage0, lang = "range_from")] // FIXME remove attribute after next snapshot
14851482
#[stable(feature = "rust1", since = "1.0.0")]
14861483
pub struct RangeFrom<Idx> {
14871484
/// The lower bound of the range (inclusive).
@@ -1498,7 +1495,6 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeFrom<Idx> {
14981495

14991496
/// A range which is only bounded above.
15001497
#[derive(Copy, Clone, PartialEq, Eq)]
1501-
#[cfg_attr(stage0, lang = "range_to")] // FIXME remove attribute after next snapshot
15021498
#[stable(feature = "rust1", since = "1.0.0")]
15031499
pub struct RangeTo<Idx> {
15041500
/// The upper bound of the range (exclusive).

branches/beta/src/libcore/slice.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,7 @@ impl<T> ops::Index<ops::RangeToInclusive<usize>> for [T] {
633633

634634
#[inline]
635635
fn index(&self, index: ops::RangeToInclusive<usize>) -> &[T] {
636-
// SNAP 4d3eebf change this to `0...index.end`
637-
self.index(ops::RangeInclusive::NonEmpty { start: 0, end: index.end })
636+
self.index(0...index.end)
638637
}
639638
}
640639

@@ -724,8 +723,7 @@ impl<T> ops::IndexMut<ops::RangeInclusive<usize>> for [T] {
724723
impl<T> ops::IndexMut<ops::RangeToInclusive<usize>> for [T] {
725724
#[inline]
726725
fn index_mut(&mut self, index: ops::RangeToInclusive<usize>) -> &mut [T] {
727-
// SNAP 4d3eebf change this to `0...index.end`
728-
self.index_mut(ops::RangeInclusive::NonEmpty { start: 0, end: index.end })
726+
self.index_mut(0...index.end)
729727
}
730728
}
731729

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,8 +1587,7 @@ mod traits {
15871587

15881588
#[inline]
15891589
fn index(&self, index: ops::RangeToInclusive<usize>) -> &str {
1590-
// SNAP 4d3eebf change this to `0...index.end`
1591-
self.index(ops::RangeInclusive::NonEmpty { start: 0, end: index.end })
1590+
self.index(0...index.end)
15921591
}
15931592
}
15941593

@@ -1613,8 +1612,7 @@ mod traits {
16131612
impl ops::IndexMut<ops::RangeToInclusive<usize>> for str {
16141613
#[inline]
16151614
fn index_mut(&mut self, index: ops::RangeToInclusive<usize>) -> &mut str {
1616-
// SNAP 4d3eebf change this to `0...index.end`
1617-
self.index_mut(ops::RangeInclusive::NonEmpty { start: 0, end: index.end })
1615+
self.index_mut(0...index.end)
16181616
}
16191617
}
16201618
}

0 commit comments

Comments
 (0)