Skip to content

Commit f5b0695

Browse files
committed
---
yaml --- r: 193530 b: refs/heads/beta c: 96b1f0c h: refs/heads/master v: v3
1 parent 1226a6d commit f5b0695

File tree

122 files changed

+353
-1405
lines changed

Some content is hidden

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

122 files changed

+353
-1405
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: ae16afb9e3ea783e50d810cfac8035ad03e628a4
34+
refs/heads/beta: 96b1f0c0be849d785cb4597ea9a8d088c3a2adf4
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/mk/main.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -30,8 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
34-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
34+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
3535
CFG_DISABLE_UNSTABLE_FEATURES=1
3636
endif
3737
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/beta/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
590590

591591
# The tests select when to use debug configuration on their own;
592592
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
593-
CTEST_RUSTC_FLAGS := $$(subst -C debug-assertions,,$$(CFG_RUSTC_FLAGS))
593+
CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
594594

595595
# The tests cannot be optimized while the rest of the compiler is optimized, so
596596
# filter out the optimization (if any) from rustc and then figure out if we need

branches/beta/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#![feature(path)]
2525
#![feature(os)]
2626
#![feature(io)]
27+
#![feature(fs)]
2728
#![feature(net)]
28-
#![feature(path_ext)]
2929

3030
#![deny(warnings)]
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Threads and Communication Guide
22

33
This content has moved into
4-
[the Rust Programming Language book](book/concurrency.html).
4+
[the Rust Programming Language book](book/tasks.html).

branches/beta/src/doc/reference.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,14 +2555,6 @@ The currently implemented features of the reference compiler are:
25552555
types, e.g. as the return type of a public function.
25562556
This capability may be removed in the future.
25572557

2558-
* `allow_internal_unstable` - Allows `macro_rules!` macros to be tagged with the
2559-
`#[allow_internal_unstable]` attribute, designed
2560-
to allow `std` macros to call
2561-
`#[unstable]`/feature-gated functionality
2562-
internally without imposing on callers
2563-
(i.e. making them behave like function calls in
2564-
terms of encapsulation).
2565-
25662558
If a feature is promoted to a language feature, then all existing programs will
25672559
start to receive compilation warnings about #[feature] directives which enabled
25682560
the new feature (because the directive is no longer necessary). However, if a

branches/beta/src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ let v = vec![1, 2, 3]; // v: Vec<i32>
6060
brackets `[]` with `vec!`. Rust allows you to use either in either situation,
6161
this is just convention.)
6262

63-
There's an alternate form of `vec!` for repeating an initial value:
64-
65-
```
66-
let v = vec![0; 10]; // ten zeroes
67-
```
68-
6963
You can get the length of, iterate over, and subscript vectors just like
7064
arrays. In addition, (mutable) vectors can grow automatically:
7165

branches/beta/src/liballoc/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656
//! The [`heap`](heap/index.html) module defines the low-level interface to the
5757
//! default global allocator. It is not compatible with the libc allocator API.
5858
59-
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
60-
#![cfg_attr(stage0, feature(custom_attribute))]
6159
#![crate_name = "alloc"]
6260
#![unstable(feature = "alloc")]
6361
#![feature(staged_api)]

branches/beta/src/libarena/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
//! arena but can only hold objects of a single type, and `Arena`, which is a
2020
//! more complex, slower arena which can hold objects of any type.
2121
22-
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
23-
#![cfg_attr(stage0, feature(custom_attribute))]
2422
#![crate_name = "arena"]
2523
#![unstable(feature = "rustc_private")]
2624
#![staged_api]

branches/beta/src/libcollections/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
//!
1313
//! See [std::collections](../std/collections) for a detailed discussion of collections in Rust.
1414
15-
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
16-
#![cfg_attr(stage0, feature(custom_attribute))]
15+
1716
#![crate_name = "collections"]
1817
#![unstable(feature = "collections")]
1918
#![staged_api]

branches/beta/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ pub trait StrExt: Index<RangeFull, Output = str> {
10861086
///
10871087
/// let s = "中华Việt Nam";
10881088
/// let mut i = s.len();
1089-
/// while i > 0 {
1089+
/// while i < 0 {
10901090
/// let CharRange {ch, next} = s.char_range_at_reverse(i);
10911091
/// println!("{}: {}", i, ch);
10921092
/// i = next;

branches/beta/src/libcore/iter.rs

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,14 +1279,14 @@ pub struct Cloned<I> {
12791279
}
12801280

12811281
#[stable(feature = "rust1", since = "1.0.0")]
1282-
impl<I> Iterator for Cloned<I> where
1283-
I: Iterator,
1284-
I::Item: Deref,
1285-
<I::Item as Deref>::Target: Clone
1282+
impl<T, D, I> Iterator for Cloned<I> where
1283+
T: Clone,
1284+
D: Deref<Target=T>,
1285+
I: Iterator<Item=D>,
12861286
{
1287-
type Item = <I::Item as Deref>::Target;
1287+
type Item = T;
12881288

1289-
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
1289+
fn next(&mut self) -> Option<T> {
12901290
self.it.next().cloned()
12911291
}
12921292

@@ -1296,36 +1296,36 @@ impl<I> Iterator for Cloned<I> where
12961296
}
12971297

12981298
#[stable(feature = "rust1", since = "1.0.0")]
1299-
impl<I> DoubleEndedIterator for Cloned<I> where
1300-
I: DoubleEndedIterator,
1301-
I::Item: Deref,
1302-
<I::Item as Deref>::Target: Clone
1299+
impl<T, D, I> DoubleEndedIterator for Cloned<I> where
1300+
T: Clone,
1301+
D: Deref<Target=T>,
1302+
I: DoubleEndedIterator<Item=D>,
13031303
{
1304-
fn next_back(&mut self) -> Option<<Self as Iterator>::Item> {
1304+
fn next_back(&mut self) -> Option<T> {
13051305
self.it.next_back().cloned()
13061306
}
13071307
}
13081308

13091309
#[stable(feature = "rust1", since = "1.0.0")]
1310-
impl<I> ExactSizeIterator for Cloned<I> where
1311-
I: ExactSizeIterator,
1312-
I::Item: Deref,
1313-
<I::Item as Deref>::Target: Clone
1310+
impl<T, D, I> ExactSizeIterator for Cloned<I> where
1311+
T: Clone,
1312+
D: Deref<Target=T>,
1313+
I: ExactSizeIterator<Item=D>,
13141314
{}
13151315

13161316
#[unstable(feature = "core", reason = "trait is experimental")]
1317-
impl<I> RandomAccessIterator for Cloned<I> where
1318-
I: RandomAccessIterator,
1319-
I::Item: Deref,
1320-
<I::Item as Deref>::Target: Clone
1317+
impl<T, D, I> RandomAccessIterator for Cloned<I> where
1318+
T: Clone,
1319+
D: Deref<Target=T>,
1320+
I: RandomAccessIterator<Item=D>
13211321
{
13221322
#[inline]
13231323
fn indexable(&self) -> usize {
13241324
self.it.indexable()
13251325
}
13261326

13271327
#[inline]
1328-
fn idx(&mut self, index: usize) -> Option<<Self as Iterator>::Item> {
1328+
fn idx(&mut self, index: usize) -> Option<T> {
13291329
self.it.idx(index).cloned()
13301330
}
13311331
}
@@ -1400,14 +1400,11 @@ pub struct Chain<A, B> {
14001400
}
14011401

14021402
#[stable(feature = "rust1", since = "1.0.0")]
1403-
impl<A, B> Iterator for Chain<A, B> where
1404-
A: Iterator,
1405-
B: Iterator<Item = A::Item>
1406-
{
1407-
type Item = A::Item;
1403+
impl<T, A, B> Iterator for Chain<A, B> where A: Iterator<Item=T>, B: Iterator<Item=T> {
1404+
type Item = T;
14081405

14091406
#[inline]
1410-
fn next(&mut self) -> Option<A::Item> {
1407+
fn next(&mut self) -> Option<T> {
14111408
if self.flag {
14121409
self.b.next()
14131410
} else {
@@ -1437,12 +1434,12 @@ impl<A, B> Iterator for Chain<A, B> where
14371434
}
14381435

14391436
#[stable(feature = "rust1", since = "1.0.0")]
1440-
impl<A, B> DoubleEndedIterator for Chain<A, B> where
1441-
A: DoubleEndedIterator,
1442-
B: DoubleEndedIterator<Item=A::Item>,
1437+
impl<T, A, B> DoubleEndedIterator for Chain<A, B> where
1438+
A: DoubleEndedIterator<Item=T>,
1439+
B: DoubleEndedIterator<Item=T>,
14431440
{
14441441
#[inline]
1445-
fn next_back(&mut self) -> Option<A::Item> {
1442+
fn next_back(&mut self) -> Option<T> {
14461443
match self.b.next_back() {
14471444
Some(x) => Some(x),
14481445
None => self.a.next_back()
@@ -1451,9 +1448,9 @@ impl<A, B> DoubleEndedIterator for Chain<A, B> where
14511448
}
14521449

14531450
#[unstable(feature = "core", reason = "trait is experimental")]
1454-
impl<A, B> RandomAccessIterator for Chain<A, B> where
1455-
A: RandomAccessIterator,
1456-
B: RandomAccessIterator<Item = A::Item>,
1451+
impl<T, A, B> RandomAccessIterator for Chain<A, B> where
1452+
A: RandomAccessIterator<Item=T>,
1453+
B: RandomAccessIterator<Item=T>,
14571454
{
14581455
#[inline]
14591456
fn indexable(&self) -> usize {
@@ -1462,7 +1459,7 @@ impl<A, B> RandomAccessIterator for Chain<A, B> where
14621459
}
14631460

14641461
#[inline]
1465-
fn idx(&mut self, index: usize) -> Option<A::Item> {
1462+
fn idx(&mut self, index: usize) -> Option<T> {
14661463
let len = self.a.indexable();
14671464
if index < len {
14681465
self.a.idx(index)
@@ -1482,12 +1479,14 @@ pub struct Zip<A, B> {
14821479
}
14831480

14841481
#[stable(feature = "rust1", since = "1.0.0")]
1485-
impl<A, B> Iterator for Zip<A, B> where A: Iterator, B: Iterator
1482+
impl<T, U, A, B> Iterator for Zip<A, B> where
1483+
A: Iterator<Item = T>,
1484+
B: Iterator<Item = U>,
14861485
{
1487-
type Item = (A::Item, B::Item);
1486+
type Item = (T, U);
14881487

14891488
#[inline]
1490-
fn next(&mut self) -> Option<(A::Item, B::Item)> {
1489+
fn next(&mut self) -> Option<(T, U)> {
14911490
match self.a.next() {
14921491
None => None,
14931492
Some(x) => match self.b.next() {
@@ -1516,12 +1515,12 @@ impl<A, B> Iterator for Zip<A, B> where A: Iterator, B: Iterator
15161515
}
15171516

15181517
#[stable(feature = "rust1", since = "1.0.0")]
1519-
impl<A, B> DoubleEndedIterator for Zip<A, B> where
1520-
A: DoubleEndedIterator + ExactSizeIterator,
1521-
B: DoubleEndedIterator + ExactSizeIterator,
1518+
impl<T, U, A, B> DoubleEndedIterator for Zip<A, B> where
1519+
A: DoubleEndedIterator + ExactSizeIterator<Item=T>,
1520+
B: DoubleEndedIterator + ExactSizeIterator<Item=U>,
15221521
{
15231522
#[inline]
1524-
fn next_back(&mut self) -> Option<(A::Item, B::Item)> {
1523+
fn next_back(&mut self) -> Option<(T, U)> {
15251524
let a_sz = self.a.len();
15261525
let b_sz = self.b.len();
15271526
if a_sz != b_sz {
@@ -1541,17 +1540,17 @@ impl<A, B> DoubleEndedIterator for Zip<A, B> where
15411540
}
15421541

15431542
#[unstable(feature = "core", reason = "trait is experimental")]
1544-
impl<A, B> RandomAccessIterator for Zip<A, B> where
1545-
A: RandomAccessIterator,
1546-
B: RandomAccessIterator
1543+
impl<T, U, A, B> RandomAccessIterator for Zip<A, B> where
1544+
A: RandomAccessIterator<Item=T>,
1545+
B: RandomAccessIterator<Item=U>,
15471546
{
15481547
#[inline]
15491548
fn indexable(&self) -> usize {
15501549
cmp::min(self.a.indexable(), self.b.indexable())
15511550
}
15521551

15531552
#[inline]
1554-
fn idx(&mut self, index: usize) -> Option<(A::Item, B::Item)> {
1553+
fn idx(&mut self, index: usize) -> Option<(T, U)> {
15551554
match self.a.idx(index) {
15561555
None => None,
15571556
Some(x) => match self.b.idx(index) {
@@ -2059,9 +2058,8 @@ pub struct Scan<I, St, F> {
20592058
}
20602059

20612060
#[stable(feature = "rust1", since = "1.0.0")]
2062-
impl<B, I, St, F> Iterator for Scan<I, St, F> where
2063-
I: Iterator,
2064-
F: FnMut(&mut St, I::Item) -> Option<B>,
2061+
impl<A, B, I: Iterator<Item=A>, St, F> Iterator for Scan<I, St, F> where
2062+
F: FnMut(&mut St, A) -> Option<B>,
20652063
{
20662064
type Item = B;
20672065

branches/beta/src/libcore/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
//! often generated by LLVM. Additionally, this library can make explicit
3636
//! calls to these functions. Their signatures are the same as found in C.
3737
//! These functions are often provided by the system libc, but can also be
38-
//! provided by `librlibc` which is distributed with the standard rust
39-
//! distribution.
38+
//! provided by the [rlibc crate](https://crates.io/crates/rlibc).
4039
//!
4140
//! * `rust_begin_unwind` - This function takes three arguments, a
4241
//! `fmt::Arguments`, a `&str`, and a `usize`. These three arguments dictate
@@ -47,8 +46,6 @@
4746
// Since libcore defines many fundamental lang items, all tests live in a
4847
// separate crate, libcoretest, to avoid bizarre issues.
4948

50-
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
51-
#![cfg_attr(stage0, feature(custom_attribute))]
5249
#![crate_name = "core"]
5350
#![unstable(feature = "core")]
5451
#![staged_api]

branches/beta/src/libcore/macros.rs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,10 @@ macro_rules! assert_eq {
100100
/// This will invoke the `panic!` macro if the provided expression cannot be
101101
/// evaluated to `true` at runtime.
102102
///
103-
/// Unlike `assert!`, `debug_assert!` statements are only enabled in non
104-
/// optimized builds by default. An optimized build will omit all
105-
/// `debug_assert!` statements unless `-C debug-assertions` is passed to the
106-
/// compiler. This makes `debug_assert!` useful for checks that are too
107-
/// expensive to be present in a release build but may be helpful during
108-
/// development.
103+
/// Unlike `assert!`, `debug_assert!` statements can be disabled by passing
104+
/// `--cfg ndebug` to the compiler. This makes `debug_assert!` useful for
105+
/// checks that are too expensive to be present in a release build but may be
106+
/// helpful during development.
109107
///
110108
/// # Example
111109
///
@@ -127,20 +125,18 @@ macro_rules! assert_eq {
127125
#[macro_export]
128126
#[stable(feature = "rust1", since = "1.0.0")]
129127
macro_rules! debug_assert {
130-
($($arg:tt)*) => (if cfg!(debug_assertions) { assert!($($arg)*); })
128+
($($arg:tt)*) => (if cfg!(not(ndebug)) { assert!($($arg)*); })
131129
}
132130

133131
/// Asserts that two expressions are equal to each other, testing equality in
134132
/// both directions.
135133
///
136134
/// On panic, this macro will print the values of the expressions.
137135
///
138-
/// Unlike `assert_eq!`, `debug_assert_eq!` statements are only enabled in non
139-
/// optimized builds by default. An optimized build will omit all
140-
/// `debug_assert_eq!` statements unless `-C debug-assertions` is passed to the
141-
/// compiler. This makes `debug_assert_eq!` useful for checks that are too
142-
/// expensive to be present in a release build but may be helpful during
143-
/// development.
136+
/// Unlike `assert_eq!`, `debug_assert_eq!` statements can be disabled by
137+
/// passing `--cfg ndebug` to the compiler. This makes `debug_assert_eq!`
138+
/// useful for checks that are too expensive to be present in a release build
139+
/// but may be helpful during development.
144140
///
145141
/// # Example
146142
///
@@ -151,7 +147,7 @@ macro_rules! debug_assert {
151147
/// ```
152148
#[macro_export]
153149
macro_rules! debug_assert_eq {
154-
($($arg:tt)*) => (if cfg!(debug_assertions) { assert_eq!($($arg)*); })
150+
($($arg:tt)*) => (if cfg!(not(ndebug)) { assert_eq!($($arg)*); })
155151
}
156152

157153
/// Short circuiting evaluation on Err

0 commit comments

Comments
 (0)