We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
static_borrow_mut!()
1 parent 0ea3fde commit c051331Copy full SHA for c051331
examples/xbd-net/src/lib.rs
@@ -10,6 +10,9 @@ fn panic(info: &core::panic::PanicInfo) -> ! { mcu_if::panic(info) }
10
#[alloc_error_handler]
11
fn alloc_error(layout: mcu_if::alloc::alloc::Layout) -> ! { mcu_if::alloc_error(layout) }
12
13
+#[macro_export]
14
+macro_rules! static_borrow_mut { ($x:expr) => (unsafe { &mut *core::ptr::addr_of_mut!($x) }) }
15
+
16
use mcu_if::{println, alloc::boxed::Box};
17
18
mod xbd;
0 commit comments