From 89c922079eaefc748febdb62aeccfff598a07c69 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 12 Feb 2019 15:08:46 +0100 Subject: update examples and tests --- tests/cfail/init-divergent.rs | 2 +- tests/cfail/init-input.rs | 2 +- tests/cfail/init-output.rs | 2 +- tests/cfail/late-not-send.rs | 6 ++++-- tests/cfail/late-uninit.rs | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/cfail') diff --git a/tests/cfail/init-divergent.rs b/tests/cfail/init-divergent.rs index 400c805..54813d4 100644 --- a/tests/cfail/init-divergent.rs +++ b/tests/cfail/init-divergent.rs @@ -11,7 +11,7 @@ use rtfm::app; const APP: () = { #[init] fn init() -> ! { - //~^ ERROR `init` must have type signature `[unsafe] fn()` + //~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]` loop {} } }; diff --git a/tests/cfail/init-input.rs b/tests/cfail/init-input.rs index fa79099..3bf0cad 100644 --- a/tests/cfail/init-input.rs +++ b/tests/cfail/init-input.rs @@ -11,6 +11,6 @@ use rtfm::app; const APP: () = { #[init] fn init(undef: u32) { - //~^ ERROR `init` must have type signature `[unsafe] fn()` + //~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]` } }; diff --git a/tests/cfail/init-output.rs b/tests/cfail/init-output.rs index 1200aca..414a35a 100644 --- a/tests/cfail/init-output.rs +++ b/tests/cfail/init-output.rs @@ -11,7 +11,7 @@ use rtfm::app; const APP: () = { #[init] fn init() -> u32 { - //~^ ERROR `init` must have type signature `[unsafe] fn()` + //~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]` 0 } }; diff --git a/tests/cfail/late-not-send.rs b/tests/cfail/late-not-send.rs index b9180fe..eb3048d 100644 --- a/tests/cfail/late-not-send.rs +++ b/tests/cfail/late-not-send.rs @@ -22,8 +22,10 @@ const APP: () = { static mut X: NotSend = (); #[init] - fn init() { - X = NotSend { _0: PhantomData }; + fn init() -> init::LateResources { + init::LateResources { + X: NotSend { _0: PhantomData }, + } } #[interrupt(resources = [X])] diff --git a/tests/cfail/late-uninit.rs b/tests/cfail/late-uninit.rs index eeb9bd4..55122ed 100644 --- a/tests/cfail/late-uninit.rs +++ b/tests/cfail/late-uninit.rs @@ -1,3 +1,5 @@ +// TODO remove in v0.5.x + #![no_main] #![no_std] -- cgit v1.2.3