about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp.rs5
-rw-r--r--src/libcore/intrinsics.rs7
-rw-r--r--src/libcore/lib.rs5
-rw-r--r--src/libcore/macros.rs65
-rw-r--r--src/libcore/panicking.rs3
-rw-r--r--src/libcore/tests/lib.rs3
6 files changed, 3 insertions, 85 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 67445daa436..3ae9b05b865 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -427,7 +427,7 @@ impl<T: Ord> Ord for Reverse<T> {
 ///     }
 /// }
 /// ```
-#[cfg_attr(not(stage0), lang = "ord")]
+#[lang = "ord"]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Ord: Eq + PartialOrd<Self> {
     /// This method returns an `Ordering` between `self` and `other`.
@@ -597,8 +597,7 @@ impl PartialOrd for Ordering {
 /// assert_eq!(x < y, true);
 /// assert_eq!(x.lt(&y), true);
 /// ```
-#[cfg_attr(stage0, lang = "ord")]
-#[cfg_attr(not(stage0), lang = "partial_ord")]
+#[lang = "partial_ord"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_on_unimplemented = "can't compare `{Self}` with `{Rhs}`"]
 pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 3b740adc468..83274682250 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1293,7 +1293,6 @@ extern "rust-intrinsic" {
     pub fn bswap<T>(x: T) -> T;
 
     /// Reverses the bits in an integer type `T`.
-    #[cfg(not(stage0))]
     pub fn bitreverse<T>(x: T) -> T;
 
     /// Performs checked integer addition.
@@ -1316,7 +1315,6 @@ extern "rust-intrinsic" {
 
     /// Performs an exact division, resulting in undefined behavior where
     /// `x % y != 0` or `y == 0` or `x == T::min_value() && y == -1`
-    #[cfg(not(stage0))]
     pub fn exact_div<T>(x: T, y: T) -> T;
 
     /// Performs an unchecked division, resulting in undefined behavior
@@ -1401,8 +1399,3 @@ extern "rust-intrinsic" {
     /// Probably will never become stable.
     pub fn nontemporal_store<T>(ptr: *mut T, val: T);
 }
-
-#[cfg(stage0)]
-pub unsafe fn exact_div<T>(a: T, b: T) -> T {
-    unchecked_div(a, b)
-}
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 5a62b8438f9..cf9abb26d3e 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -78,8 +78,6 @@
 #![feature(doc_spotlight)]
 #![feature(fn_must_use)]
 #![feature(fundamental)]
-#![cfg_attr(stage0, feature(i128_type))]
-#![cfg_attr(stage0, feature(inclusive_range_syntax))]
 #![feature(intrinsics)]
 #![feature(iterator_flatten)]
 #![feature(iterator_repeat_with)]
@@ -103,9 +101,6 @@
 #![feature(untagged_unions)]
 #![feature(unwind_attributes)]
 
-#![cfg_attr(stage0, allow(unused_attributes))]
-#![cfg_attr(stage0, feature(never_type))]
-
 #[prelude_import]
 #[allow(unused)]
 use prelude::v1::*;
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 8a87bea71e2..90a9cb3379b 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -28,71 +28,6 @@ macro_rules! panic {
     });
 }
 
-/// Ensure that a boolean expression is `true` at runtime.
-///
-/// This will invoke the [`panic!`] macro if the provided expression cannot be
-/// evaluated to `true` at runtime.
-///
-/// # Uses
-///
-/// Assertions are always checked in both debug and release builds, and cannot
-/// be disabled. See [`debug_assert!`] for assertions that are not enabled in
-/// release builds by default.
-///
-/// Unsafe code relies on `assert!` to enforce run-time invariants that, if
-/// violated could lead to unsafety.
-///
-/// Other use-cases of `assert!` include [testing] and enforcing run-time
-/// invariants in safe code (whose violation cannot result in unsafety).
-///
-/// # Custom Messages
-///
-/// This macro has a second form, where a custom panic message can
-/// be provided with or without arguments for formatting.  See [`std::fmt`]
-/// for syntax for this form.
-///
-/// [`panic!`]: macro.panic.html
-/// [`debug_assert!`]: macro.debug_assert.html
-/// [testing]: ../book/second-edition/ch11-01-writing-tests.html#checking-results-with-the-assert-macro
-/// [`std::fmt`]: ../std/fmt/index.html
-///
-/// # Examples
-///
-/// ```
-/// // the panic message for these assertions is the stringified value of the
-/// // expression given.
-/// assert!(true);
-///
-/// fn some_computation() -> bool { true } // a very simple function
-///
-/// assert!(some_computation());
-///
-/// // assert with a custom message
-/// let x = true;
-/// assert!(x, "x wasn't true!");
-///
-/// let a = 3; let b = 27;
-/// assert!(a + b == 30, "a = {}, b = {}", a, b);
-/// ```
-#[macro_export]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-macro_rules! assert {
-    ($cond:expr) => (
-        if !$cond {
-            panic!(concat!("assertion failed: ", stringify!($cond)))
-        }
-    );
-    ($cond:expr,) => (
-        assert!($cond)
-    );
-    ($cond:expr, $($arg:tt)+) => (
-        if !$cond {
-            panic!($($arg)+)
-        }
-    );
-}
-
 /// Asserts that two expressions are equal to each other (using [`PartialEq`]).
 ///
 /// On panic, this macro will print the values of the expressions with their
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs
index 94db0baa3f9..6b3dc75af46 100644
--- a/src/libcore/panicking.rs
+++ b/src/libcore/panicking.rs
@@ -64,8 +64,7 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32))
     #[allow(improper_ctypes)]
     extern {
         #[lang = "panic_fmt"]
-        #[cfg_attr(stage0, unwind)]
-        #[cfg_attr(not(stage0), unwind(allowed))]
+        #[unwind(allowed)]
         fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
     }
     let (file, line, col) = *file_line_col;
diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs
index de7211e718c..971759dcdd0 100644
--- a/src/libcore/tests/lib.rs
+++ b/src/libcore/tests/lib.rs
@@ -23,10 +23,7 @@
 #![feature(fmt_internals)]
 #![feature(hashmap_internals)]
 #![feature(iterator_step_by)]
-#![cfg_attr(stage0, feature(i128_type))]
-#![cfg_attr(stage0, feature(inclusive_range_syntax))]
 #![feature(iterator_flatten)]
-#![cfg_attr(stage0, feature(conservative_impl_trait))]
 #![feature(iterator_repeat_with)]
 #![feature(nonzero)]
 #![feature(pattern)]