Skip to content

Commit 91b21b6

Browse files
committed
---
yaml --- r: 171535 b: refs/heads/batch c: cedaf46 h: refs/heads/master i: 171533: 99665ba 171531: 8e740fe 171527: d7b91c2 171519: a71ca02 v: v3
1 parent 7964c36 commit 91b21b6

File tree

171 files changed

+1721
-1232
lines changed

Some content is hidden

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

171 files changed

+1721
-1232
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 4f801c433f0f48fcdbe7e63575d4ac131774400e
32+
refs/heads/batch: cedaf4696ffe76afdebbd5183269d91176c97a94
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 496dc4eae7de9d14cd49511a9acfbf5f11ae6c3f
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,18 @@ then
599599
fi
600600
putvar CFG_RELEASE_CHANNEL
601601

602+
# A magic value that allows the compiler to use unstable features
603+
# during the bootstrap even when doing so would normally be an error
604+
# because of feature staging or because the build turns on
605+
# warnings-as-errors and unstable features default to warnings. The
606+
# build has to match this key in an env var. Meant to be a mild
607+
# deterrent from users just turning on unstable features on the stable
608+
# channel.
609+
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
610+
# during a Makefile reconfig.
611+
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%N`}"
612+
putvar CFG_BOOTSTRAP_KEY
613+
602614
step_msg "looking for build programs"
603615

604616
probe_need CFG_PERL perl

branches/batch/mk/main.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ ifeq ($(CFG_RELEASE_CHANNEL),stable)
2525
CFG_RELEASE=$(CFG_RELEASE_NUM)
2626
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
2727
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
28+
CFG_DISABLE_UNSTABLE_FEATURES=1
2829
endif
2930
ifeq ($(CFG_RELEASE_CHANNEL),beta)
3031
# The beta channel is temporarily called 'alpha'
3132
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
3233
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
34+
CFG_DISABLE_UNSTABLE_FEATURES=1
3335
endif
3436
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
3537
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
@@ -319,11 +321,20 @@ export CFG_VERSION_WIN
319321
export CFG_RELEASE
320322
export CFG_PACKAGE_NAME
321323
export CFG_BUILD
324+
export CFG_RELEASE_CHANNEL
322325
export CFG_LLVM_ROOT
323326
export CFG_PREFIX
324327
export CFG_LIBDIR
325328
export CFG_LIBDIR_RELATIVE
326329
export CFG_DISABLE_INJECT_STD_VERSION
330+
ifdef CFG_DISABLE_UNSTABLE_FEATURES
331+
CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATURES))
332+
# Turn on feature-staging
333+
export CFG_DISABLE_UNSTABLE_FEATURES
334+
endif
335+
# Subvert unstable feature lints to do the self-build
336+
export CFG_BOOTSTRAP_KEY
337+
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
327338

328339
######################################################################
329340
# Per-stage targets and runner

branches/batch/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#![crate_type = "bin"]
12-
#![feature(slicing_syntax, unboxed_closures)]
12+
#![feature(slicing_syntax)]
1313

1414
#![deny(warnings)]
1515

branches/batch/src/doc/guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ As you can see, `enum` and `match` used together are quite useful!
13771377

13781378
`match` is also an expression, which means we can use it on the right-hand
13791379
side of a `let` binding or directly where an expression is used. We could
1380-
also implement the previous line like this:
1380+
also implement the previous example like this:
13811381

13821382
```{rust}
13831383
use std::cmp::Ordering;
@@ -1653,7 +1653,7 @@ for e in a.iter() {
16531653
You can access a particular element of an array with **subscript notation**:
16541654

16551655
```{rust}
1656-
let names = ["Graydon", "Brian", "Niko"]; // names: [&str, 3]
1656+
let names = ["Graydon", "Brian", "Niko"]; // names: [&str; 3]
16571657
16581658
println!("The second name is: {}", names[1]);
16591659
```
@@ -4789,7 +4789,7 @@ of `Option`, we need to provide a concrete type in place of the type
47894789
parameter. For example, if we wanted something like our `OptionalInt`, we would
47904790
need to instantiate an `Option<i32>`. Inside the declaration of our enum,
47914791
wherever we see a `T`, we replace it with the type specified (or inferred by the
4792-
the compiler).
4792+
compiler).
47934793
47944794
```{rust}
47954795
let x: Option<i32> = Some(5);

branches/batch/src/doc/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ use std::thread::Thread;
542542
fn main() {
543543
let vec = vec![1i, 2, 3];
544544
545-
for i in range(1u, 3) {
545+
for i in range(0u, 3) {
546546
Thread::spawn(move || {
547547
println!("{}", vec[i]);
548548
}).detach();
@@ -558,7 +558,7 @@ a vector:
558558
```{rust}
559559
let vec = vec![1i, 2, 3];
560560
561-
for i in range(1u, vec.len()) {
561+
for i in range(0u, vec.len()) {
562562
println!("{}", vec[i]);
563563
}
564564
```

branches/batch/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ the guarantee that these issues are never caused by safe code.
12181218
(`offset` intrinsic), with
12191219
the exception of one byte past the end which is permitted.
12201220
* Using `std::ptr::copy_nonoverlapping_memory` (`memcpy32`/`memcpy64`
1221-
instrinsics) on overlapping buffers
1221+
intrinsics) on overlapping buffers
12221222
* Invalid values in primitive types, even in private fields/locals:
12231223
* Dangling/null references or boxes
12241224
* A value other than `false` (0) or `true` (1) in a `bool`

branches/batch/src/etc/emacs/rust-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
"u64" "i64"
190190

191191
"f32" "f64"
192-
"float" "int" "uint"
192+
"float" "int" "uint" "isize" "usize"
193193
"bool"
194194
"str" "char"))
195195

branches/batch/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
<context id="types" style-ref="type">
8080
<keyword>bool</keyword>
8181
<keyword>int</keyword>
82+
<keyword>isize</keyword>
8283
<keyword>uint</keyword>
84+
<keyword>usize</keyword>
8385
<keyword>i8</keyword>
8486
<keyword>i16</keyword>
8587
<keyword>i32</keyword>

branches/batch/src/etc/kate/rust.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@
9191
<list name="types">
9292
<item> bool </item>
9393
<item> int </item>
94+
<item> isize </item>
9495
<item> uint </item>
96+
<item> usize </item>
9597
<item> i8 </item>
9698
<item> i16 </item>
9799
<item> i32 </item>

branches/batch/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ syn match rustMacroVariable "$\w\+"
5959
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override macro
6060

6161
" Built-in types {{{2
62-
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
62+
syn keyword rustType int isize uint usize float char bool u8 u16 u32 u64 f32
6363
syn keyword rustType f64 i8 i16 i32 i64 str Self
6464

6565
" Things from the prelude (src/libstd/prelude.rs) {{{2

branches/batch/src/liballoc/arc.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//!
3838
//! let five = Arc::new(5i);
3939
//!
40-
//! for i in range(0u, 10) {
40+
//! for _ in range(0u, 10) {
4141
//! let five = five.clone();
4242
//!
4343
//! Thread::spawn(move || {
@@ -67,21 +67,20 @@
6767
//! }
6868
//! ```
6969
70+
use core::prelude::*;
71+
7072
use core::atomic;
7173
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
7274
use core::borrow::BorrowFrom;
73-
use core::clone::Clone;
7475
use core::fmt::{self, Show};
75-
use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
76+
use core::cmp::{Ordering};
7677
use core::default::Default;
77-
use core::marker::{Sync, Send};
78-
use core::mem::{min_align_of, size_of, drop};
78+
use core::mem::{min_align_of, size_of};
7979
use core::mem;
8080
use core::nonzero::NonZero;
81-
use core::ops::{Drop, Deref};
82-
use core::option::Option;
83-
use core::option::Option::{Some, None};
84-
use core::ptr::{self, PtrExt};
81+
use core::ops::Deref;
82+
use core::ptr;
83+
use core::hash::{Hash, Hasher};
8584
use heap::deallocate;
8685

8786
/// An atomically reference counted wrapper for shared state.
@@ -591,6 +590,12 @@ impl<T: Default + Sync + Send> Default for Arc<T> {
591590
fn default() -> Arc<T> { Arc::new(Default::default()) }
592591
}
593592

593+
impl<H: Hasher, T: Hash<H>> Hash<H> for Arc<T> {
594+
fn hash(&self, state: &mut H) {
595+
(**self).hash(state)
596+
}
597+
}
598+
594599
#[cfg(test)]
595600
#[allow(experimental)]
596601
mod tests {

branches/batch/src/liballoc/boxed.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,20 @@ impl<T: ?Sized + Ord> Ord for Box<T> {
106106
#[stable]}
107107
impl<T: ?Sized + Eq> Eq for Box<T> {}
108108

109+
#[cfg(stage0)]
109110
impl<S: hash::Writer, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
110111
#[inline]
111112
fn hash(&self, state: &mut S) {
112113
(**self).hash(state);
113114
}
114115
}
116+
#[cfg(not(stage0))]
117+
impl<S: hash::Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
118+
#[inline]
119+
fn hash(&self, state: &mut S) {
120+
(**self).hash(state);
121+
}
122+
}
115123

116124
/// Extension methods for an owning `Any` trait object.
117125
#[unstable = "post-DST and coherence changes, this will not be a trait but \

branches/batch/src/liballoc/heap.rs

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,20 @@ unsafe fn exchange_free(ptr: *mut u8, old_size: uint, align: uint) {
115115
// The minimum alignment guaranteed by the architecture. This value is used to
116116
// add fast paths for low alignment values. In practice, the alignment is a
117117
// constant at the call site and the branch will be optimized out.
118-
#[cfg(any(target_arch = "arm",
119-
target_arch = "mips",
120-
target_arch = "mipsel"))]
118+
#[cfg(all(not(feature = "external_funcs"),
119+
not(feature = "external_crate"),
120+
any(target_arch = "arm",
121+
target_arch = "mips",
122+
target_arch = "mipsel")))]
121123
const MIN_ALIGN: uint = 8;
122-
#[cfg(any(target_arch = "x86",
123-
target_arch = "x86_64",
124-
target_arch = "aarch64"))]
124+
#[cfg(all(not(feature = "external_funcs"),
125+
not(feature = "external_crate"),
126+
any(target_arch = "x86",
127+
target_arch = "x86_64",
128+
target_arch = "aarch64"))]
125129
const MIN_ALIGN: uint = 16;
126130

127-
#[cfg(external_funcs)]
131+
#[cfg(feature = "external_funcs")]
128132
mod imp {
129133
extern {
130134
fn rust_allocate(size: uint, align: uint) -> *mut u8;
@@ -142,14 +146,13 @@ mod imp {
142146
}
143147

144148
#[inline]
145-
pub unsafe fn reallocate_inplace(ptr: *mut u8, old_size: uint, size: uint,
146-
align: uint) -> uint {
147-
rust_reallocate_inplace(ptr, old_size, size, align)
149+
pub unsafe fn deallocate(ptr: *mut u8, old_size: uint, align: uint) {
150+
rust_deallocate(ptr, old_size, align)
148151
}
149152

150153
#[inline]
151-
pub unsafe fn deallocate(ptr: *mut u8, old_size: uint, align: uint) {
152-
rust_deallocate(ptr, old_size, align)
154+
pub unsafe fn reallocate(ptr: *mut u8, old_size: uint, size: uint, align: uint) -> *mut u8 {
155+
rust_reallocate(ptr, old_size, size, align)
153156
}
154157

155158
#[inline]
@@ -169,14 +172,16 @@ mod imp {
169172
}
170173
}
171174

172-
#[cfg(external_crate)]
175+
#[cfg(feature = "external_crate")]
173176
mod imp {
174177
extern crate external;
175178
pub use self::external::{allocate, deallocate, reallocate_inplace, reallocate};
176179
pub use self::external::{usable_size, stats_print};
177180
}
178181

179-
#[cfg(all(not(external_funcs), not(external_crate), jemalloc))]
182+
#[cfg(all(not(feature = "external_funcs"),
183+
not(feature = "external_crate"),
184+
jemalloc))]
180185
mod imp {
181186
use core::option::Option;
182187
use core::option::Option::None;
@@ -253,7 +258,10 @@ mod imp {
253258
}
254259
}
255260

256-
#[cfg(all(not(external_funcs), not(external_crate), not(jemalloc), unix))]
261+
#[cfg(all(not(feature = "external_funcs"),
262+
not(feature = "external_crate"),
263+
not(jemalloc),
264+
unix))]
257265
mod imp {
258266
use core::cmp;
259267
use core::ptr;
@@ -314,7 +322,10 @@ mod imp {
314322
pub fn stats_print() {}
315323
}
316324

317-
#[cfg(all(not(external_funcs), not(external_crate), not(jemalloc), windows))]
325+
#[cfg(all(not(feature = "external_funcs"),
326+
not(feature = "external_crate"),
327+
not(jemalloc),
328+
windows))]
318329
mod imp {
319330
use libc::{c_void, size_t};
320331
use libc;

branches/batch/src/liballoc/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
5959
#![crate_name = "alloc"]
6060
#![experimental]
61+
#![staged_api]
6162
#![crate_type = "rlib"]
6263
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
6364
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
@@ -69,6 +70,8 @@
6970

7071
#[macro_use]
7172
extern crate core;
73+
74+
#[cfg(all(not(feature = "external_funcs"), not(feature = "external_crate")))]
7275
extern crate libc;
7376

7477
// Allow testing this library

0 commit comments

Comments
 (0)