about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-06 14:50:14 +0000
committerbors <bors@rust-lang.org>2018-01-06 14:50:14 +0000
commit72176cf96cb79a0ebf62972b76dbe68c933bef4d (patch)
tree700594b27355c4c9c7a708d9a1e16c9c0ff90293 /src/libstd
parenta9a03d9bfb0e82322439fe6c252ebd4ba6f23d98 (diff)
parentfcdca7f2da86111704e54e932f3e5ffa31d70366 (diff)
downloadrust-72176cf96cb79a0ebf62972b76dbe68c933bef4d.tar.gz
rust-72176cf96cb79a0ebf62972b76dbe68c933bef4d.zip
Auto merge of #47141 - alexcrichton:bump-bootstrap, r=alexcrichton
Bump to 1.25.0

* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
  the beta branch but needed to go to the master branch as well.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rt.rs49
-rw-r--r--src/libstd/termination.rs2
2 files changed, 3 insertions, 48 deletions
diff --git a/src/libstd/rt.rs b/src/libstd/rt.rs
index 921fbec3da3..af414d25b5f 100644
--- a/src/libstd/rt.rs
+++ b/src/libstd/rt.rs
@@ -28,7 +28,7 @@ pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
 
 // To reduce the generated code of the new `lang_start`, this function is doing
 // the real work.
-#[cfg(not(any(test, stage0)))]
+#[cfg(not(test))]
 fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
                        argc: isize, argv: *const *const u8) -> isize {
     use panic;
@@ -66,55 +66,10 @@ fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
     }
 }
 
-#[cfg(not(any(test, stage0)))]
+#[cfg(not(test))]
 #[lang = "start"]
 fn lang_start<T: ::termination::Termination + 'static>
     (main: fn() -> T, argc: isize, argv: *const *const u8) -> isize
 {
     lang_start_internal(&move || main().report(), argc, argv)
 }
-
-#[cfg(all(not(test), stage0))]
-#[lang = "start"]
-fn lang_start(main: fn(), argc: isize, argv: *const *const u8) -> isize {
-    use panic;
-    use sys;
-    use sys_common;
-    use sys_common::thread_info;
-    use thread::Thread;
-    #[cfg(not(feature = "backtrace"))]
-    use mem;
-
-    sys::init();
-
-    let failed = unsafe {
-        let main_guard = sys::thread::guard::init();
-        sys::stack_overflow::init();
-
-        // Next, set up the current Thread with the guard information we just
-        // created. Note that this isn't necessary in general for new threads,
-        // but we just do this to name the main thread and to give it correct
-        // info about the stack bounds.
-        let thread = Thread::new(Some("main".to_owned()));
-        thread_info::set(main_guard, thread);
-
-        // Store our args if necessary in a squirreled away location
-        sys::args::init(argc, argv);
-
-        // Let's run some code!
-        #[cfg(feature = "backtrace")]
-        let res = panic::catch_unwind(|| {
-            ::sys_common::backtrace::__rust_begin_short_backtrace(main)
-        });
-        #[cfg(not(feature = "backtrace"))]
-        let res = panic::catch_unwind(mem::transmute::<_, fn()>(main));
-        sys_common::cleanup();
-        res.is_err()
-    };
-
-    if failed {
-        101
-    } else {
-        0
-    }
-}
diff --git a/src/libstd/termination.rs b/src/libstd/termination.rs
index 61137ba4922..93a913bb540 100644
--- a/src/libstd/termination.rs
+++ b/src/libstd/termination.rs
@@ -29,7 +29,7 @@ mod exit {
 ///
 /// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
 /// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
-#[cfg_attr(not(any(stage0, test)), lang = "termination")]
+#[cfg_attr(not(test), lang = "termination")]
 #[unstable(feature = "termination_trait", issue = "43301")]
 #[rustc_on_unimplemented =
   "`main` can only return types that implement {Termination}, not `{Self}`"]