Format no_std test code with rustfmt 0.4.1

This commit is contained in:
David Tolnay
2018-04-07 19:22:24 -07:00
parent 3e535325e1
commit 5efb22ebee
+10 -6
View File
@@ -18,15 +18,17 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
#[lang = "eh_personality"] #[lang = "eh_personality"]
#[no_mangle] #[no_mangle]
pub extern fn rust_eh_personality() {} pub extern "C" fn rust_eh_personality() {}
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
#[no_mangle] #[no_mangle]
pub extern fn rust_begin_panic(_msg: core::fmt::Arguments, pub extern "C" fn rust_begin_panic(
_file: &'static str, _msg: core::fmt::Arguments,
_line: u32) -> ! { _file: &'static str,
_line: u32,
) -> ! {
unsafe { unsafe {
libc::abort() libc::abort();
} }
} }
@@ -45,7 +47,9 @@ struct Newtype(u8);
struct Tuple(u8, u8); struct Tuple(u8, u8);
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
struct Struct { f: u8 } struct Struct {
f: u8,
}
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
enum Enum { enum Enum {