Skip to content

Commit 81e375d

Browse files
committed
Change name of lang_start_real to lang_start_internal
Also remove `'static` from `__rust_begin_short_backtrace`
1 parent 7dfec34 commit 81e375d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/libstd/rt.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
2929
// To reduce the generated code of the new `lang_start`, this function is doing
3030
// the real work.
3131
#[cfg(not(any(test, stage0)))]
32-
fn lang_start_real<F>(main: F, argc: isize, argv: *const *const u8) -> !
33-
where F: FnOnce() -> i32 + Send + ::panic::UnwindSafe + 'static
34-
{
32+
fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
33+
argc: isize, argv: *const *const u8) -> ! {
3534
use panic;
3635
use sys;
3736
use sys_common;
@@ -75,7 +74,7 @@ fn lang_start_real<F>(main: F, argc: isize, argv: *const *const u8) -> !
7574
fn lang_start<T: ::termination::Termination + 'static>
7675
(main: fn() -> T, argc: isize, argv: *const *const u8) -> !
7776
{
78-
lang_start_real(move || main().report(), argc, argv)
77+
lang_start_internal(&move || main().report(), argc, argv)
7978
}
8079

8180
#[cfg(all(not(test), stage0))]

src/libstd/sys_common/backtrace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn filter_frames(frames: &[Frame],
128128
/// Fixed frame used to clean the backtrace with `RUST_BACKTRACE=1`.
129129
#[inline(never)]
130130
pub fn __rust_begin_short_backtrace<F, T>(f: F) -> T
131-
where F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
131+
where F: FnOnce() -> T, F: Send, T: Send
132132
{
133133
f()
134134
}

0 commit comments

Comments
 (0)