1 #![cfg_attr(not(feature = "std"), feature(lang_items, start))] 2 #![cfg_attr(not(feature = "std"), no_std)] 3 4 #[cfg_attr(not(feature = "std"), start)] start(_argc: isize, _argv: *const *const u8) -> isize5fn start(_argc: isize, _argv: *const *const u8) -> isize { 6 0 7 } 8 #[lang = "eh_personality"] 9 #[no_mangle] 10 #[cfg(not(feature = "std"))] rust_eh_personality()11pub extern "C" fn rust_eh_personality() {} 12 #[panic_handler] 13 #[cfg(not(feature = "std"))] panic(_info: &core::panic::PanicInfo) -> !14fn panic(_info: &core::panic::PanicInfo) -> ! { 15 unsafe { 16 libc::abort(); 17 } 18 } 19 20 use displaydoc::Display; 21 22 #[derive(Display)] 23 #[prefix_enum_doc_attributes] 24 enum TestType { 25 /// this variant is too 26 Variant1, 27 28 /// this variant is two 29 Variant2, 30 } 31 32 static_assertions::assert_impl_all!(TestType: core::fmt::Display); 33 34 #[cfg(feature = "std")] main()35fn main() {} 36