Avoid codegen for Result::into_ok in lang_start
Otherwise, we end up pulling in an extra module as part of codegen, and that costs us a sizeable amount of work (both in LLVM and outside).
This commit is contained in:
@@ -59,10 +59,10 @@ fn lang_start<T: crate::process::Termination + 'static>(
|
|||||||
argc: isize,
|
argc: isize,
|
||||||
argv: *const *const u8,
|
argv: *const *const u8,
|
||||||
) -> isize {
|
) -> isize {
|
||||||
lang_start_internal(
|
let Ok(v) = lang_start_internal(
|
||||||
&move || crate::sys_common::backtrace::__rust_begin_short_backtrace(main).report(),
|
&move || crate::sys_common::backtrace::__rust_begin_short_backtrace(main).report(),
|
||||||
argc,
|
argc,
|
||||||
argv,
|
argv,
|
||||||
)
|
);
|
||||||
.into_ok()
|
v
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user