Skip to content

Commit

Permalink
Auto merge of #44154 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Bump to 1.22.0 and update boostrap compiler

Time to get a new nightly!
  • Loading branch information
bors committed Sep 1, 2017
2 parents ed532c0 + 271c63c commit f861b6e
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 271 deletions.
121 changes: 57 additions & 64 deletions src/Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ debug-assertions = false
debug = false
debug-assertions = false

[replace]
"https://github.com/rust-lang/cargo#0.22.0" = { path = "tools/cargo" }
[patch.'https://github.com/rust-lang/cargo']
cargo = { path = "tools/cargo" }
2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use Build;
use config::Config;

// The version number
pub const CFG_RELEASE_NUM: &str = "1.21.0";
pub const CFG_RELEASE_NUM: &str = "1.22.0";

// An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ pub fn symlink_dir(src: &Path, dest: &Path) -> io::Result<()> {
ptr::null_mut());

let mut data = [0u8; MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
let mut db = data.as_mut_ptr()
let db = data.as_mut_ptr()
as *mut REPARSE_MOUNTPOINT_DATA_BUFFER;
let buf = &mut (*db).ReparseTarget as *mut _;
let mut i = 0;
Expand Down
8 changes: 0 additions & 8 deletions src/libcore/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ macro_rules! array_impls {
}
}

#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<T:Copy> Clone for [T; $N] {
fn clone(&self) -> [T; $N] {
*self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Hash> Hash for [T; $N] {
fn hash<H: hash::Hasher>(&self, state: &mut H) {
Expand Down
44 changes: 1 addition & 43 deletions src/libcore/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), lang = "clone")]
#[lang = "clone"]
pub trait Clone : Sized {
/// Returns a copy of the value.
///
Expand Down Expand Up @@ -130,45 +130,3 @@ pub struct AssertParamIsClone<T: Clone + ?Sized> { _field: ::marker::PhantomData
reason = "deriving hack, should not be public",
issue = "0")]
pub struct AssertParamIsCopy<T: Copy + ?Sized> { _field: ::marker::PhantomData<T> }

#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<'a, T: ?Sized> Clone for &'a T {
/// Returns a shallow copy of the reference.
#[inline]
fn clone(&self) -> &'a T { *self }
}

macro_rules! clone_impl {
($t:ty) => {
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl Clone for $t {
/// Returns a deep copy of the value.
#[inline]
fn clone(&self) -> $t { *self }
}
}
}

clone_impl! { isize }
clone_impl! { i8 }
clone_impl! { i16 }
clone_impl! { i32 }
clone_impl! { i64 }
clone_impl! { i128 }

clone_impl! { usize }
clone_impl! { u8 }
clone_impl! { u16 }
clone_impl! { u32 }
clone_impl! { u64 }
clone_impl! { u128 }

clone_impl! { f32 }
clone_impl! { f64 }

clone_impl! { ! }
clone_impl! { () }
clone_impl! { bool }
clone_impl! { char }
10 changes: 0 additions & 10 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[macro_export]
// This stability attribute is totally useless.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
macro_rules! __rust_unstable_column {
() => {
column!()
}
}

/// Entry point of thread panic, for details, see std::macros
#[macro_export]
#[allow_internal_unstable]
Expand Down
43 changes: 0 additions & 43 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,26 +188,6 @@ pub fn forget<T>(t: T) {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
pub fn size_of<T>() -> usize {
unsafe { intrinsics::size_of::<T>() }
}

/// Returns the size of a type in bytes.
///
/// More specifically, this is the offset in bytes between successive
/// items of the same type, including alignment padding.
///
/// # Examples
///
/// ```
/// use std::mem;
///
/// assert_eq!(4, mem::size_of::<i32>());
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(not(stage0))]
pub const fn size_of<T>() -> usize {
unsafe { intrinsics::size_of::<T>() }
}
Expand Down Expand Up @@ -299,29 +279,6 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
pub fn align_of<T>() -> usize {
unsafe { intrinsics::min_align_of::<T>() }
}

/// Returns the [ABI]-required minimum alignment of a type.
///
/// Every reference to a value of the type `T` must be a multiple of this number.
///
/// This is the alignment used for struct fields. It may be smaller than the preferred alignment.
///
/// [ABI]: https://en.wikipedia.org/wiki/Application_binary_interface
///
/// # Examples
///
/// ```
/// use std::mem;
///
/// assert_eq!(4, mem::align_of::<i32>());
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(not(stage0))]
pub const fn align_of<T>() -> usize {
unsafe { intrinsics::min_align_of::<T>() }
}
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

//! Operations and constants for 32-bits floats (`f32` type)

#![cfg_attr(stage0, allow(overflowing_literals))]

#![stable(feature = "rust1", since = "1.0.0")]

use intrinsics;
Expand Down
27 changes: 0 additions & 27 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,36 +875,9 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
a == b
}

#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<T: ?Sized> Clone for *const T {
#[inline]
fn clone(&self) -> *const T {
*self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<T: ?Sized> Clone for *mut T {
#[inline]
fn clone(&self) -> *mut T {
*self
}
}

// Impls for function pointers
macro_rules! fnptr_impls_safety_abi {
($FnTy: ty, $($Arg: ident),*) => {
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<Ret, $($Arg),*> Clone for $FnTy {
#[inline]
fn clone(&self) -> Self {
*self
}
}

#[stable(feature = "fnptr_impls", since = "1.4.0")]
impl<Ret, $($Arg),*> PartialEq for $FnTy {
#[inline]
Expand Down
8 changes: 0 additions & 8 deletions src/libcore/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ macro_rules! tuple_impls {
}
)+) => {
$(
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl<$($T:Clone),+> Clone for ($($T,)+) {
fn clone(&self) -> ($($T,)+) {
($(self.$idx.clone(),)+)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<$($T:PartialEq),+> PartialEq for ($($T,)+) where last_type!($($T,)+): ?Sized {
#[inline]
Expand Down
14 changes: 6 additions & 8 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,12 @@
// if the user has disabled jemalloc in `./configure`).
// `force_alloc_system` is *only* intended as a workaround for local rebuilds
// with a rustc without jemalloc.
// The not(stage0+msvc) gates will only last until the next stage0 bump
#![cfg_attr(all(
not(all(stage0, target_env = "msvc")),
any(stage0, feature = "force_alloc_system")),
feature(global_allocator))]
#[cfg(all(
not(all(stage0, target_env = "msvc")),
any(stage0, feature = "force_alloc_system")))]
// FIXME(#44236) shouldn't need MSVC logic
#![cfg_attr(all(not(target_env = "msvc"),
any(stage0, feature = "force_alloc_system")),
feature(global_allocator))]
#[cfg(all(not(target_env = "msvc"),
any(stage0, feature = "force_alloc_system")))]
#[global_allocator]
static ALLOC: alloc_system::System = alloc_system::System;

Expand Down
10 changes: 0 additions & 10 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
//! library. Each macro is available for use when linking against the standard
//! library.

#[macro_export]
// This stability attribute is totally useless.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
macro_rules! __rust_unstable_column {
() => {
column!()
}
}

/// The entry point for panic of Rust threads.
///
/// This allows a program to to terminate immediately and provide feedback
Expand Down
34 changes: 0 additions & 34 deletions src/libstd/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,40 +522,6 @@ pub fn begin_panic_fmt(msg: &fmt::Arguments,
begin_panic(s, file_line_col)
}

// FIXME: In PR #42938, we have added the column as info passed to the panic
// handling code. For this, we want to break the ABI of begin_panic.
// This is not possible to do directly, as the stage0 compiler is hardcoded
// to emit a call to begin_panic in src/libsyntax/ext/build.rs, only
// with the file and line number being passed, but not the colum number.
// By changing the compiler source, we can only affect behaviour of higher
// stages. We need to perform the switch over two stage0 replacements, using
// a temporary function begin_panic_new while performing the switch:
// 0. Before the current switch, we told stage1 onward to emit a call
// to begin_panic_new.
// 1. Right now, stage0 calls begin_panic_new with the new ABI,
// begin_panic stops being used. We have changed begin_panic to
// the new ABI, and started to emit calls to begin_panic in higher
// stages again, this time with the new ABI.
// 2. After the second SNAP, stage0 calls begin_panic with the new ABI,
// and we can remove the temporary begin_panic_new function.

/// This is the entry point of panicking for panic!() and assert!().
#[cfg(stage0)]
#[unstable(feature = "libstd_sys_internals",
reason = "used by the panic! macro",
issue = "0")]
#[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
pub fn begin_panic_new<M: Any + Send>(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! {
// Note that this should be the only allocation performed in this code path.
// Currently this means that panic!() on OOM will invoke this code path,
// but then again we're not really ready for panic on OOM anyway. If
// we do start doing this, then we should propagate this allocation to
// be performed in the parent of this thread instead of the thread that's
// panicking.

rust_panic_with_hook(Box::new(msg), file_line_col)
}

/// This is the entry point of panicking for panic!() and assert!().
#[unstable(feature = "libstd_sys_internals",
reason = "used by the panic! macro",
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@


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

#[cfg(not(test))]
Expand Down
5 changes: 1 addition & 4 deletions src/libstd/thread/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ macro_rules! thread_local {
issue = "0")]
#[macro_export]
#[allow_internal_unstable]
#[cfg_attr(not(stage0), allow_internal_unsafe)]
#[allow_internal_unsafe]
macro_rules! __thread_local_inner {
($(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {
$(#[$attr])* $vis static $name: $crate::thread::LocalKey<$t> = {
Expand Down Expand Up @@ -394,9 +394,6 @@ pub mod fast {
}
}

#[cfg(stage0)]
unsafe impl<T> ::marker::Sync for Key<T> { }

impl<T> Key<T> {
pub const fn new() -> Key<T> {
Key {
Expand Down
2 changes: 1 addition & 1 deletion src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
# `0.x.0` for Cargo where they were released on `date`.

date: 2017-07-18
date: 2017-08-29
rustc: beta
cargo: beta

Expand Down
2 changes: 1 addition & 1 deletion src/tools/cargo
3 changes: 1 addition & 2 deletions src/tools/tidy/src/pal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ const EXCEPTION_PATHS: &'static [&'static str] = &[
"src/rtstartup", // Not sure what to do about this. magic stuff for mingw

// temporary exceptions
"src/libstd/rtdeps.rs", // Until rustbuild replaces make
"src/libstd/lib.rs", // FIXME(#44217)
"src/libstd/path.rs",
"src/libstd/f32.rs",
"src/libstd/f64.rs",
"src/libstd/lib.rs", // Until next stage0 snapshot bump
"src/libstd/sys_common/mod.rs",
"src/libstd/sys_common/net.rs",
"src/libterm", // Not sure how to make this crate portable, but test needs it
Expand Down

0 comments on commit f861b6e

Please sign in to comment.