Skip to content

Commit

Permalink
Format no_std test code with rustfmt 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 8, 2018
1 parent 3e53532 commit 5efb22e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test_suite/no_std/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {

#[lang = "eh_personality"]
#[no_mangle]
pub extern fn rust_eh_personality() {}
pub extern "C" fn rust_eh_personality() {}

#[lang = "panic_fmt"]
#[no_mangle]
pub extern fn rust_begin_panic(_msg: core::fmt::Arguments,
_file: &'static str,
_line: u32) -> ! {
pub extern "C" fn rust_begin_panic(
_msg: core::fmt::Arguments,
_file: &'static str,
_line: u32,
) -> ! {
unsafe {
libc::abort()
libc::abort();
}
}

Expand All @@ -45,7 +47,9 @@ struct Newtype(u8);
struct Tuple(u8, u8);

#[derive(Serialize, Deserialize)]
struct Struct { f: u8 }
struct Struct {
f: u8,
}

#[derive(Serialize, Deserialize)]
enum Enum {
Expand Down

0 comments on commit 5efb22e

Please sign in to comment.