aboutsummaryrefslogtreecommitdiff
path: root/tests/cfail
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-02-12 15:08:46 +0100
committerJorge Aparicio <jorge@japaric.io>2019-02-12 15:08:46 +0100
commit89c922079eaefc748febdb62aeccfff598a07c69 (patch)
treeeebd97bd85976b5aa962353e2a48590e57557447 /tests/cfail
parent88599780e0eba38d9e543b7809f586479f6956bd (diff)
update examples and tests
Diffstat (limited to 'tests/cfail')
-rw-r--r--tests/cfail/init-divergent.rs2
-rw-r--r--tests/cfail/init-input.rs2
-rw-r--r--tests/cfail/init-output.rs2
-rw-r--r--tests/cfail/late-not-send.rs6
-rw-r--r--tests/cfail/late-uninit.rs2
5 files changed, 9 insertions, 5 deletions
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]