Skip to content

Commit 2972687

Browse files
committedAug 31, 2017
Update bootstrap compiler
This commit updates the bootstrap compiler and clears out a number of #[cfg(stage0)] annotations and related business
1 parent 97b01ab commit 2972687

File tree

13 files changed

+5
-196
lines changed

13 files changed

+5
-196
lines changed
 

‎src/libcore/array.rs

-8
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,6 @@ macro_rules! array_impls {
123123
}
124124
}
125125

126-
#[stable(feature = "rust1", since = "1.0.0")]
127-
#[cfg(stage0)]
128-
impl<T:Copy> Clone for [T; $N] {
129-
fn clone(&self) -> [T; $N] {
130-
*self
131-
}
132-
}
133-
134126
#[stable(feature = "rust1", since = "1.0.0")]
135127
impl<T: Hash> Hash for [T; $N] {
136128
fn hash<H: hash::Hasher>(&self, state: &mut H) {

‎src/libcore/clone.rs

+1-43
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
/// }
8989
/// ```
9090
#[stable(feature = "rust1", since = "1.0.0")]
91-
#[cfg_attr(not(stage0), lang = "clone")]
91+
#[lang = "clone"]
9292
pub trait Clone : Sized {
9393
/// Returns a copy of the value.
9494
///
@@ -130,45 +130,3 @@ pub struct AssertParamIsClone<T: Clone + ?Sized> { _field: ::marker::PhantomData
130130
reason = "deriving hack, should not be public",
131131
issue = "0")]
132132
pub struct AssertParamIsCopy<T: Copy + ?Sized> { _field: ::marker::PhantomData<T> }
133-
134-
#[stable(feature = "rust1", since = "1.0.0")]
135-
#[cfg(stage0)]
136-
impl<'a, T: ?Sized> Clone for &'a T {
137-
/// Returns a shallow copy of the reference.
138-
#[inline]
139-
fn clone(&self) -> &'a T { *self }
140-
}
141-
142-
macro_rules! clone_impl {
143-
($t:ty) => {
144-
#[stable(feature = "rust1", since = "1.0.0")]
145-
#[cfg(stage0)]
146-
impl Clone for $t {
147-
/// Returns a deep copy of the value.
148-
#[inline]
149-
fn clone(&self) -> $t { *self }
150-
}
151-
}
152-
}
153-
154-
clone_impl! { isize }
155-
clone_impl! { i8 }
156-
clone_impl! { i16 }
157-
clone_impl! { i32 }
158-
clone_impl! { i64 }
159-
clone_impl! { i128 }
160-
161-
clone_impl! { usize }
162-
clone_impl! { u8 }
163-
clone_impl! { u16 }
164-
clone_impl! { u32 }
165-
clone_impl! { u64 }
166-
clone_impl! { u128 }
167-
168-
clone_impl! { f32 }
169-
clone_impl! { f64 }
170-
171-
clone_impl! { ! }
172-
clone_impl! { () }
173-
clone_impl! { bool }
174-
clone_impl! { char }

‎src/libcore/macros.rs

-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[macro_export]
12-
// This stability attribute is totally useless.
13-
#[stable(feature = "rust1", since = "1.0.0")]
14-
#[cfg(stage0)]
15-
macro_rules! __rust_unstable_column {
16-
() => {
17-
column!()
18-
}
19-
}
20-
2111
/// Entry point of thread panic, for details, see std::macros
2212
#[macro_export]
2313
#[allow_internal_unstable]

‎src/libcore/mem.rs

-43
Original file line numberDiff line numberDiff line change
@@ -188,26 +188,6 @@ pub fn forget<T>(t: T) {
188188
/// ```
189189
#[inline]
190190
#[stable(feature = "rust1", since = "1.0.0")]
191-
#[cfg(stage0)]
192-
pub fn size_of<T>() -> usize {
193-
unsafe { intrinsics::size_of::<T>() }
194-
}
195-
196-
/// Returns the size of a type in bytes.
197-
///
198-
/// More specifically, this is the offset in bytes between successive
199-
/// items of the same type, including alignment padding.
200-
///
201-
/// # Examples
202-
///
203-
/// ```
204-
/// use std::mem;
205-
///
206-
/// assert_eq!(4, mem::size_of::<i32>());
207-
/// ```
208-
#[inline]
209-
#[stable(feature = "rust1", since = "1.0.0")]
210-
#[cfg(not(stage0))]
211191
pub const fn size_of<T>() -> usize {
212192
unsafe { intrinsics::size_of::<T>() }
213193
}
@@ -299,29 +279,6 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
299279
/// ```
300280
#[inline]
301281
#[stable(feature = "rust1", since = "1.0.0")]
302-
#[cfg(stage0)]
303-
pub fn align_of<T>() -> usize {
304-
unsafe { intrinsics::min_align_of::<T>() }
305-
}
306-
307-
/// Returns the [ABI]-required minimum alignment of a type.
308-
///
309-
/// Every reference to a value of the type `T` must be a multiple of this number.
310-
///
311-
/// This is the alignment used for struct fields. It may be smaller than the preferred alignment.
312-
///
313-
/// [ABI]: https://en.wikipedia.org/wiki/Application_binary_interface
314-
///
315-
/// # Examples
316-
///
317-
/// ```
318-
/// use std::mem;
319-
///
320-
/// assert_eq!(4, mem::align_of::<i32>());
321-
/// ```
322-
#[inline]
323-
#[stable(feature = "rust1", since = "1.0.0")]
324-
#[cfg(not(stage0))]
325282
pub const fn align_of<T>() -> usize {
326283
unsafe { intrinsics::min_align_of::<T>() }
327284
}

‎src/libcore/num/f32.rs

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
//! Operations and constants for 32-bits floats (`f32` type)
1212
13-
#![cfg_attr(stage0, allow(overflowing_literals))]
14-
1513
#![stable(feature = "rust1", since = "1.0.0")]
1614

1715
use intrinsics;

‎src/libcore/ptr.rs

-27
Original file line numberDiff line numberDiff line change
@@ -875,36 +875,9 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
875875
a == b
876876
}
877877

878-
#[stable(feature = "rust1", since = "1.0.0")]
879-
#[cfg(stage0)]
880-
impl<T: ?Sized> Clone for *const T {
881-
#[inline]
882-
fn clone(&self) -> *const T {
883-
*self
884-
}
885-
}
886-
887-
#[stable(feature = "rust1", since = "1.0.0")]
888-
#[cfg(stage0)]
889-
impl<T: ?Sized> Clone for *mut T {
890-
#[inline]
891-
fn clone(&self) -> *mut T {
892-
*self
893-
}
894-
}
895-
896878
// Impls for function pointers
897879
macro_rules! fnptr_impls_safety_abi {
898880
($FnTy: ty, $($Arg: ident),*) => {
899-
#[stable(feature = "rust1", since = "1.0.0")]
900-
#[cfg(stage0)]
901-
impl<Ret, $($Arg),*> Clone for $FnTy {
902-
#[inline]
903-
fn clone(&self) -> Self {
904-
*self
905-
}
906-
}
907-
908881
#[stable(feature = "fnptr_impls", since = "1.4.0")]
909882
impl<Ret, $($Arg),*> PartialEq for $FnTy {
910883
#[inline]

‎src/libcore/tuple.rs

-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ macro_rules! tuple_impls {
2121
}
2222
)+) => {
2323
$(
24-
#[stable(feature = "rust1", since = "1.0.0")]
25-
#[cfg(stage0)]
26-
impl<$($T:Clone),+> Clone for ($($T,)+) {
27-
fn clone(&self) -> ($($T,)+) {
28-
($(self.$idx.clone(),)+)
29-
}
30-
}
31-
3224
#[stable(feature = "rust1", since = "1.0.0")]
3325
impl<$($T:PartialEq),+> PartialEq for ($($T,)+) where last_type!($($T,)+): ?Sized {
3426
#[inline]

‎src/libstd/macros.rs

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
//! library. Each macro is available for use when linking against the standard
1515
//! library.
1616
17-
#[macro_export]
18-
// This stability attribute is totally useless.
19-
#[stable(feature = "rust1", since = "1.0.0")]
20-
#[cfg(stage0)]
21-
macro_rules! __rust_unstable_column {
22-
() => {
23-
column!()
24-
}
25-
}
26-
2717
/// The entry point for panic of Rust threads.
2818
///
2919
/// This allows a program to to terminate immediately and provide feedback

‎src/libstd/panicking.rs

-34
Original file line numberDiff line numberDiff line change
@@ -522,40 +522,6 @@ pub fn begin_panic_fmt(msg: &fmt::Arguments,
522522
begin_panic(s, file_line_col)
523523
}
524524

525-
// FIXME: In PR #42938, we have added the column as info passed to the panic
526-
// handling code. For this, we want to break the ABI of begin_panic.
527-
// This is not possible to do directly, as the stage0 compiler is hardcoded
528-
// to emit a call to begin_panic in src/libsyntax/ext/build.rs, only
529-
// with the file and line number being passed, but not the colum number.
530-
// By changing the compiler source, we can only affect behaviour of higher
531-
// stages. We need to perform the switch over two stage0 replacements, using
532-
// a temporary function begin_panic_new while performing the switch:
533-
// 0. Before the current switch, we told stage1 onward to emit a call
534-
// to begin_panic_new.
535-
// 1. Right now, stage0 calls begin_panic_new with the new ABI,
536-
// begin_panic stops being used. We have changed begin_panic to
537-
// the new ABI, and started to emit calls to begin_panic in higher
538-
// stages again, this time with the new ABI.
539-
// 2. After the second SNAP, stage0 calls begin_panic with the new ABI,
540-
// and we can remove the temporary begin_panic_new function.
541-
542-
/// This is the entry point of panicking for panic!() and assert!().
543-
#[cfg(stage0)]
544-
#[unstable(feature = "libstd_sys_internals",
545-
reason = "used by the panic! macro",
546-
issue = "0")]
547-
#[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
548-
pub fn begin_panic_new<M: Any + Send>(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! {
549-
// Note that this should be the only allocation performed in this code path.
550-
// Currently this means that panic!() on OOM will invoke this code path,
551-
// but then again we're not really ready for panic on OOM anyway. If
552-
// we do start doing this, then we should propagate this allocation to
553-
// be performed in the parent of this thread instead of the thread that's
554-
// panicking.
555-
556-
rust_panic_with_hook(Box::new(msg), file_line_col)
557-
}
558-
559525
/// This is the entry point of panicking for panic!() and assert!().
560526
#[unstable(feature = "libstd_sys_internals",
561527
reason = "used by the panic! macro",

‎src/libstd/rt.rs

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626

2727
// Reexport some of our utilities which are expected by other crates.
28-
#[cfg(stage0)]
29-
pub use panicking::begin_panic_new;
3028
pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
3129

3230
#[cfg(not(test))]

‎src/libstd/thread/local.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ macro_rules! thread_local {
157157
issue = "0")]
158158
#[macro_export]
159159
#[allow_internal_unstable]
160-
#[cfg_attr(not(stage0), allow_internal_unsafe)]
160+
#[allow_internal_unsafe]
161161
macro_rules! __thread_local_inner {
162162
($(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {
163163
$(#[$attr])* $vis static $name: $crate::thread::LocalKey<$t> = {
@@ -394,9 +394,6 @@ pub mod fast {
394394
}
395395
}
396396

397-
#[cfg(stage0)]
398-
unsafe impl<T> ::marker::Sync for Key<T> { }
399-
400397
impl<T> Key<T> {
401398
pub const fn new() -> Key<T> {
402399
Key {

‎src/stage0.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.x.0` for Cargo where they were released on `date`.
1414

15-
date: 2017-07-18
16-
rustc: beta
17-
cargo: beta
15+
date: 2017-08-25
16+
rustc: nightly
17+
cargo: nightly
1818

1919
# When making a stable release the process currently looks like:
2020
#

‎src/tools/tidy/src/pal.rs

-2
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ const EXCEPTION_PATHS: &'static [&'static str] = &[
6565
"src/rtstartup", // Not sure what to do about this. magic stuff for mingw
6666

6767
// temporary exceptions
68-
"src/libstd/rtdeps.rs", // Until rustbuild replaces make
6968
"src/libstd/path.rs",
7069
"src/libstd/f32.rs",
7170
"src/libstd/f64.rs",
72-
"src/libstd/lib.rs", // Until next stage0 snapshot bump
7371
"src/libstd/sys_common/mod.rs",
7472
"src/libstd/sys_common/net.rs",
7573
"src/libterm", // Not sure how to make this crate portable, but test needs it

0 commit comments

Comments
 (0)
Please sign in to comment.