Skip to content

Commit ccc6fa6

Browse files
uefi-macros: Make entry example more compatible with stable
The `entry` macro's example code had `#![no_std]` in it to make it look like how you'd normally use it with the uefi targets. In the context that the example code is compiled in though, the target is the host's target. To get the example compiling there, we had to add some hidden hacks for `eh_personality` and a panic handler. Those hacks don't work on the stable channel though, so drop them along with `no_std`.
1 parent 0947274 commit ccc6fa6

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

uefi-macros/src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,7 @@ fn get_function_arg_name(f: &ItemFn, arg_index: usize, errors: &mut TokenStream2
221221
///
222222
/// ```no_run
223223
/// #![no_main]
224-
/// #![no_std]
225224
/// #![feature(abi_efiapi)]
226-
/// # // A bit of boilerplate needed to make the example compile in the
227-
/// # // context of `cargo test`.
228-
/// # #![feature(lang_items)]
229-
/// # #[lang = "eh_personality"]
230-
/// # fn eh_personality() {}
231-
/// # #[panic_handler]
232-
/// # fn panic_handler(info: &core::panic::PanicInfo) -> ! {
233-
/// # loop {}
234-
/// # }
235225
///
236226
/// use uefi::prelude::*;
237227
///

0 commit comments

Comments
 (0)