Skip to content

Commit

Permalink
Change name of lang_start_real to lang_start_internal
Browse files Browse the repository at this point in the history
Also remove `'static` from `__rust_begin_short_backtrace`
  • Loading branch information
bkchr committed Dec 26, 2017
1 parent 7dfec34 commit 81e375d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/libstd/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ 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)))]
fn lang_start_real<F>(main: F, argc: isize, argv: *const *const u8) -> !
where F: FnOnce() -> i32 + Send + ::panic::UnwindSafe + 'static
{
fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
argc: isize, argv: *const *const u8) -> ! {
use panic;
use sys;
use sys_common;
Expand Down Expand Up @@ -75,7 +74,7 @@ fn lang_start_real<F>(main: F, argc: isize, argv: *const *const u8) -> !
fn lang_start<T: ::termination::Termination + 'static>
(main: fn() -> T, argc: isize, argv: *const *const u8) -> !
{
lang_start_real(move || main().report(), argc, argv)
lang_start_internal(&move || main().report(), argc, argv)
}

#[cfg(all(not(test), stage0))]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys_common/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ fn filter_frames(frames: &[Frame],
/// Fixed frame used to clean the backtrace with `RUST_BACKTRACE=1`.
#[inline(never)]
pub fn __rust_begin_short_backtrace<F, T>(f: F) -> T
where F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
where F: FnOnce() -> T, F: Send, T: Send
{
f()
}
Expand Down

0 comments on commit 81e375d

Please sign in to comment.