about summary refs log tree commit diff
path: root/tests/assembly/wasm_exceptions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/assembly/wasm_exceptions.rs')
-rw-r--r--tests/assembly/wasm_exceptions.rs26
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/assembly/wasm_exceptions.rs b/tests/assembly/wasm_exceptions.rs
index 3d3b13ff32b..7bdf7f1287c 100644
--- a/tests/assembly/wasm_exceptions.rs
+++ b/tests/assembly/wasm_exceptions.rs
@@ -8,7 +8,7 @@
 #![feature(core_intrinsics)]
 #![feature(rustc_attrs)]
 
-extern {
+extern "C" {
     fn may_panic();
 
     #[rustc_nounwind]
@@ -19,7 +19,9 @@ struct LogOnDrop;
 
 impl Drop for LogOnDrop {
     fn drop(&mut self) {
-        unsafe { log_number(0); }
+        unsafe {
+            log_number(0);
+        }
     }
 }
 
@@ -27,7 +29,9 @@ impl Drop for LogOnDrop {
 #[no_mangle]
 pub fn test_cleanup() {
     let _log_on_drop = LogOnDrop;
-    unsafe { may_panic(); }
+    unsafe {
+        may_panic();
+    }
 
     // CHECK-NOT: call
     // CHECK: try
@@ -41,12 +45,16 @@ pub fn test_cleanup() {
 #[no_mangle]
 pub fn test_rtry() {
     unsafe {
-        core::intrinsics::catch_unwind(|_| {
-            may_panic();
-        }, core::ptr::null_mut(), |data, exception| {
-            log_number(data as usize);
-            log_number(exception as usize);
-        });
+        core::intrinsics::catch_unwind(
+            |_| {
+                may_panic();
+            },
+            core::ptr::null_mut(),
+            |data, exception| {
+                log_number(data as usize);
+                log_number(exception as usize);
+            },
+        );
     }
 
     // CHECK-NOT: call