diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2019-04-21 20:20:15 +0200 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2019-05-01 20:49:25 +0200 |
| commit | d0aaa2a805afdda30b49b3dfdb7072f302855a79 (patch) | |
| tree | 037714c3934d616eb3015b827a6bcd54d53cb52e /tests/cfail/early-return-2.rs | |
| parent | d2fb62f729de3ad24132b69298e17193ac334df4 (diff) | |
update compile-fail tests
Diffstat (limited to 'tests/cfail/early-return-2.rs')
| -rw-r--r-- | tests/cfail/early-return-2.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/cfail/early-return-2.rs b/tests/cfail/early-return-2.rs deleted file mode 100644 index bf867e0..0000000 --- a/tests/cfail/early-return-2.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - static mut UNINITIALIZED: bool = (); - - #[init] - fn init() { - if false { - return; //~ ERROR `init` is *not* allowed to early return - } - - UNINITIALIZED = true; - } - - #[interrupt(resources = [UNINITIALIZED])] - fn UART0() { - if resources.UNINITIALIZED { - // UB - } - } -}; |
