From be72ff57195f7f2cf5cec10501f0e84e599ded97 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 14 Apr 2017 00:39:12 -0500 Subject: [PATCH] change signature of `idle` to ! --- src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 07f1e6c8a0..5b79c52781 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -351,13 +351,19 @@ macro_rules! tasks { }) => { fn main() { $crate::critical(|cmax| { - let p0 = unsafe { ::core::ptr::read(0x0 as *const P0) }; + fn signature(_: fn($crate::P0, $crate::CMAX)) {} + + signature(init); + let p0 = unsafe { ::core::ptr::read(0x0 as *const _) }; init(p0, cmax); set_priorities(); enable_tasks(); }); - let p0 = unsafe { ::core::ptr::read(0x0 as *const P0) }; + fn signature(_: fn($crate::P0) -> !) {} + + signature(idle); + let p0 = unsafe { ::core::ptr::read(0x0 as *const _) }; idle(p0); fn set_priorities() {