From 6ffb39bd08068c5b81706e122a09857e94ad6d84 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 28 Sep 2016 20:20:25 +0000 Subject: [PATCH 1/2] Update bootstrap compiler --- src/stage0.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stage0.txt b/src/stage0.txt index f9cf819dc94..05189f2011b 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -12,6 +12,6 @@ # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # released on `$date` -rustc: beta-2016-08-17 -rustc_key: 195e6261 -cargo: nightly-2016-08-21 +rustc: beta-2016-09-28 +rustc_key: 62b3e239 +cargo: nightly-2016-09-26 From 3b49c60ab71547e6dbaef086eb4cd2bb7fe9ff94 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 28 Sep 2016 20:55:26 +0000 Subject: [PATCH 2/2] Remove stage0 hacks --- src/bootstrap/bin/rustc.rs | 3 +-- src/bootstrap/compile.rs | 16 +--------------- src/liballoc/arc.rs | 2 -- src/liballoc/lib.rs | 1 - src/liballoc/raw_vec.rs | 1 - src/liballoc/rc.rs | 2 -- src/libcollections/lib.rs | 1 - src/libcollections/vec.rs | 1 - src/libcompiler_builtins/lib.rs | 4 ++-- src/libcore/clone.rs | 7 ------- src/libcore/intrinsics.rs | 2 -- src/libstd/collections/hash/table.rs | 1 - src/libstd/lib.rs | 1 - 13 files changed, 4 insertions(+), 38 deletions(-) diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index a70a15b383c..cdbbc229bc8 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -104,8 +104,7 @@ fn main() { let is_panic_abort = args.windows(2).any(|a| { &*a[0] == "--crate-name" && &*a[1] == "panic_abort" }); - // FIXME(stage0): remove this `stage != "0"` condition - if is_panic_abort && stage != "0" { + if is_panic_abort { cmd.arg("-C").arg("panic=abort"); } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 9de438cfa7d..16dbcae99fa 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -25,7 +25,7 @@ use std::process::Command; use build_helper::output; use filetime::FileTime; -use util::{exe, staticlib, libdir, mtime, is_dylib, copy}; +use util::{exe, libdir, mtime, is_dylib, copy}; use {Build, Compiler, Mode}; /// Build the standard library. @@ -40,20 +40,6 @@ pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) { let libdir = build.sysroot_libdir(compiler, target); let _ = fs::remove_dir_all(&libdir); t!(fs::create_dir_all(&libdir)); - // FIXME(stage0) remove this `if` after the next snapshot - // The stage0 compiler still passes the `-lcompiler-rt` flag to the linker but now `bootstrap` - // never builds a `libcopmiler-rt.a`! We'll fill the hole by simply copying stage0's - // `libcompiler-rt.a` to where the stage1's one is expected (though we could as well just use - // an empty `.a` archive). Note that the symbols of that stage0 `libcompiler-rt.a` won't make - // it to the final binary because now `libcore.rlib` also contains the symbols that - // `libcompiler-rt.a` provides. Since that rlib appears first in the linker arguments, its - // symbols are used instead of `libcompiler-rt.a`'s. - if compiler.stage == 0 { - let rtlib = &staticlib("compiler-rt", target); - let src = build.rustc.parent().unwrap().parent().unwrap().join("lib").join("rustlib") - .join(target).join("lib").join(rtlib); - copy(&src, &libdir.join(rtlib)); - } // Some platforms have startup objects that may be required to produce the // libstd dynamic library, for example. diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 5f9ccd1820c..e3c92fc1aa8 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -127,7 +127,6 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize; /// } /// ``` -#[cfg_attr(stage0, unsafe_no_drop_flag)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Arc { ptr: Shared>, @@ -153,7 +152,6 @@ impl, U: ?Sized> CoerceUnsized> for Arc {} /// nodes behind strong `Arc` pointers, and then storing the parent pointers /// as `Weak` pointers. -#[cfg_attr(stage0, unsafe_no_drop_flag)] #[stable(feature = "arc_weak", since = "1.4.0")] pub struct Weak { ptr: Shared>, diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index c6453da3f46..31491106d97 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -88,7 +88,6 @@ #![feature(staged_api)] #![feature(unboxed_closures)] #![feature(unique)] -#![cfg_attr(stage0, feature(unsafe_no_drop_flag))] #![feature(unsize)] #![cfg_attr(not(test), feature(fused, fn_traits, placement_new_protocol))] diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 23542215fa8..e153507956b 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -44,7 +44,6 @@ use core::cmp; /// `shrink_to_fit`, and `from_box` will actually set RawVec's private capacity /// field. This allows zero-sized types to not be special-cased by consumers of /// this type. -#[cfg_attr(stage0, unsafe_no_drop_flag)] pub struct RawVec { ptr: Unique, cap: usize, diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index e0f635f195b..4a4de419f2e 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -252,7 +252,6 @@ struct RcBox { /// that you have to call them as e.g. `Rc::get_mut(&value)` instead of /// `value.get_mut()`. This avoids conflicts with methods of the inner /// type `T`. -#[cfg_attr(stage0, unsafe_no_drop_flag)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Rc { ptr: Shared>, @@ -873,7 +872,6 @@ impl From for Rc { /// /// [rc]: struct.Rc.html /// [downgrade]: struct.Rc.html#method.downgrade -#[cfg_attr(stage0, unsafe_no_drop_flag)] #[stable(feature = "rc_weak", since = "1.4.0")] pub struct Weak { ptr: Shared>, diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index c5a92169347..990de541b67 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -52,7 +52,6 @@ #![feature(step_by)] #![feature(unicode)] #![feature(unique)] -#![cfg_attr(stage0, feature(unsafe_no_drop_flag))] #![cfg_attr(test, feature(rand, test))] #![no_std] diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index f8b4a92df2c..e868a542d55 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -268,7 +268,6 @@ use super::range::RangeArgument; /// Vec does not currently guarantee the order in which elements are dropped /// (the order has changed in the past, and may change again). /// -#[cfg_attr(stage0, unsafe_no_drop_flag)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Vec { buf: RawVec, diff --git a/src/libcompiler_builtins/lib.rs b/src/libcompiler_builtins/lib.rs index fbcf5204d25..4a703b3da68 100644 --- a/src/libcompiler_builtins/lib.rs +++ b/src/libcompiler_builtins/lib.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![cfg_attr(not(stage0), feature(compiler_builtins))] +#![feature(compiler_builtins)] #![no_std] -#![cfg_attr(not(stage0), compiler_builtins)] +#![compiler_builtins] #![unstable(feature = "compiler_builtins_lib", reason = "internal implementation detail of rustc right now", issue = "0")] diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 0b800cacfc1..d72b18ae345 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -129,13 +129,6 @@ pub struct AssertParamIsClone { _field: ::marker::PhantomData reason = "deriving hack, should not be public", issue = "0")] pub struct AssertParamIsCopy { _field: ::marker::PhantomData } -#[cfg(stage0)] -#[doc(hidden)] -#[inline(always)] -#[unstable(feature = "derive_clone_copy", - reason = "deriving hack, should not be public", - issue = "0")] -pub fn assert_receiver_is_clone(_: &T) {} #[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized> Clone for &'a T { diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 22abe7a99b1..35fcfdf114e 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -194,14 +194,12 @@ extern "rust-intrinsic" { /// own, or if it does not enable any significant optimizations. pub fn assume(b: bool); - #[cfg(not(stage0))] /// Hints to the compiler that branch condition is likely to be true. /// Returns the value passed to it. /// /// Any use other than with `if` statements will probably not have an effect. pub fn likely(b: bool) -> bool; - #[cfg(not(stage0))] /// Hints to the compiler that branch condition is likely to be false. /// Returns the value passed to it. /// diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 8f02c9c7d3d..afd833d8bdd 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -59,7 +59,6 @@ const EMPTY_BUCKET: u64 = 0; /// around just the "table" part of the hashtable. It enforces some /// invariants at the type level and employs some performance trickery, /// but in general is just a tricked out `Vec>`. -#[cfg_attr(stage0, unsafe_no_drop_flag)] pub struct RawTable { capacity: usize, size: usize, diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 912045453e0..b3e4351e9b2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -278,7 +278,6 @@ #![feature(unboxed_closures)] #![feature(unicode)] #![feature(unique)] -#![cfg_attr(stage0, feature(unsafe_no_drop_flag))] #![feature(unwind_attributes)] #![feature(vec_push_all)] #![feature(zero_one)]