Skip to content

Commit

Permalink
uefi-macros: Make entry example more compatible with stable
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
nicholasbishop committed Mar 4, 2023
1 parent 0947274 commit ccc6fa6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions uefi-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,7 @@ fn get_function_arg_name(f: &ItemFn, arg_index: usize, errors: &mut TokenStream2
///
/// ```no_run
/// #![no_main]
/// #![no_std]
/// #![feature(abi_efiapi)]
/// # // A bit of boilerplate needed to make the example compile in the
/// # // context of `cargo test`.
/// # #![feature(lang_items)]
/// # #[lang = "eh_personality"]
/// # fn eh_personality() {}
/// # #[panic_handler]
/// # fn panic_handler(info: &core::panic::PanicInfo) -> ! {
/// # loop {}
/// # }
///
/// use uefi::prelude::*;
///
Expand Down

0 comments on commit ccc6fa6

Please sign in to comment.