]> git.lizzy.rs Git - rust.git/blobdiff - src/libpanic_unwind/lib.rs
Auto merge of #67596 - Mark-Simulacrum:tidy-silence-rustfmt, r=Centril
[rust.git] / src / libpanic_unwind / lib.rs
index 3a14197c77bec3ba289315fc1cfb8773f58a6a2f..e721162edc067b789edf572623e09699fe970166 100644 (file)
 
 #![no_std]
 #![unstable(feature = "panic_unwind", issue = "32837")]
-#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
-       issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
-
+#![doc(
+    html_root_url = "https://doc.rust-lang.org/nightly/",
+    issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/"
+)]
 #![feature(core_intrinsics)]
 #![feature(lang_items)]
 #![feature(libc)]
 #![feature(staged_api)]
 #![feature(std_internals)]
 #![feature(unwind_attributes)]
-
 #![panic_runtime]
 #![feature(panic_runtime)]
 
 use alloc::boxed::Box;
 use core::intrinsics;
 use core::mem;
-use core::raw;
 use core::panic::BoxMeUp;
+use core::raw;
 
 cfg_if::cfg_if! {
     if #[cfg(target_os = "emscripten")] {
 // hairy and tightly coupled, for more information see the compiler's
 // implementation of this.
 #[no_mangle]
-pub unsafe extern "C" fn __rust_maybe_catch_panic(f: fn(*mut u8),
-                                                  data: *mut u8,
-                                                  data_ptr: *mut usize,
-                                                  vtable_ptr: *mut usize)
-                                                  -> u32 {
+pub unsafe extern "C" fn __rust_maybe_catch_panic(
+    f: fn(*mut u8),
+    data: *mut u8,
+    data_ptr: *mut usize,
+    vtable_ptr: *mut usize,
+) -> u32 {
     let mut payload = imp::payload();
     if intrinsics::r#try(f, data, &mut payload as *mut _ as *mut _) == 0 {
         0