diff options
Diffstat (limited to 'tests/cfail/unsafe-init.rs')
-rw-r--r-- | tests/cfail/unsafe-init.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/cfail/unsafe-init.rs b/tests/cfail/unsafe-init.rs new file mode 100644 index 00000000..d8bb5605 --- /dev/null +++ b/tests/cfail/unsafe-init.rs @@ -0,0 +1,15 @@ +#![no_main] +#![no_std] + +extern crate lm3s6965; +extern crate panic_halt; +extern crate rtfm; + +use rtfm::app; + +#[app(device = lm3s6965)] +const APP: () = { + #[init] + unsafe fn init(_: init::Context) {} + //~^ ERROR `init` must have type signature `fn(init::Context) [-> init::LateResources]` +}; |