diff options
Diffstat (limited to 'tests/cfail')
35 files changed, 0 insertions, 832 deletions
diff --git a/tests/cfail/cfg-resources.rs b/tests/cfail/cfg-resources.rs deleted file mode 100644 index dee1485..0000000 --- a/tests/cfail/cfg-resources.rs +++ /dev/null @@ -1,64 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[cfg(never)] - static mut O1: u32 = 0; // init - #[cfg(never)] - static mut O2: u32 = 0; // idle - #[cfg(never)] - static mut O3: u32 = 0; // EXTI0 - #[cfg(never)] - static O4: u32 = 0; // idle - #[cfg(never)] - static O5: u32 = 0; // EXTI1 - #[cfg(never)] - static O6: u32 = 0; // init - - #[cfg(never)] - static mut S1: u32 = 0; // idle & EXTI0 - #[cfg(never)] - static mut S2: u32 = 0; // EXTI0 & EXTI1 - #[cfg(never)] - static S3: u32 = 0; - - #[init(resources = [O1, O4, O5, O6, S3])] - fn init() { - resources.O1; //~ ERROR no field `O1` - resources.O4; //~ ERROR no field `O4` - resources.O5; //~ ERROR no field `O5` - resources.O6; //~ ERROR no field `O6` - resources.S3; //~ ERROR no field `S3` - } - - #[idle(resources = [O2, O4, S1, S3])] - fn idle() -> ! { - resources.O2; //~ ERROR no field `O2` - resources.O4; //~ ERROR no field `O4` - resources.S1; //~ ERROR no field `S1` - resources.S3; //~ ERROR no field `S3` - - loop {} - } - - #[interrupt(resources = [O3, S1, S2, S3])] - fn UART0() { - resources.O3; //~ ERROR no field `O3` - resources.S1; //~ ERROR no field `S1` - resources.S2; //~ ERROR no field `S2` - resources.S3; //~ ERROR no field `S3` - } - - #[interrupt(resources = [S2, O5])] - fn UART1() { - resources.S2; //~ ERROR no field `S2` - resources.O5; //~ ERROR no field `O5` - } -}; diff --git a/tests/cfail/cfg-static.rs b/tests/cfail/cfg-static.rs deleted file mode 100644 index 0d27e53..0000000 --- a/tests/cfail/cfg-static.rs +++ /dev/null @@ -1,57 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[idle] - fn idle() -> ! { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - - loop {} - } - - #[exception] - fn SVCall() { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[interrupt] - fn UART0() { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - #[task] - fn foo() { - #[cfg(never)] - static mut FOO: u32 = 0; - - FOO; //~ ERROR cannot find value `FOO` in this scope - } - - extern "C" { - fn UART1(); - } -}; diff --git a/tests/cfail/duplicate-args-2.rs b/tests/cfail/duplicate-args-2.rs deleted file mode 100644 index 1a196e9..0000000 --- a/tests/cfail/duplicate-args-2.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[task( - priority = 1, - priority = 2, //~ ERROR argument appears more than once - )] - fn foo() {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/duplicate-args.rs b/tests/cfail/duplicate-args.rs deleted file mode 100644 index a946bae..0000000 --- a/tests/cfail/duplicate-args.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[task( - capacity = 1, - capacity = 2, //~ ERROR argument appears more than once - )] - fn foo() {} - - extern "C" { - fn UART0(); - } -}; 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 - } - } -}; diff --git a/tests/cfail/early-return.rs b/tests/cfail/early-return.rs deleted file mode 100644 index fb695aa..0000000 --- a/tests/cfail/early-return.rs +++ /dev/null @@ -1,32 +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() { - let x = || { - // this is OK - return 0; - }; - - return; //~ ERROR `init` is *not* allowed to early return - - UNINITIALIZED = true; - } - - #[interrupt(resources = [UNINITIALIZED])] - fn UART0() { - if resources.UNINITIALIZED { - // UB - } - } -}; diff --git a/tests/cfail/exception-divergent.rs b/tests/cfail/exception-divergent.rs deleted file mode 100644 index 692a57c..0000000 --- a/tests/cfail/exception-divergent.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[exception] - fn SVCall() -> ! { - //~^ ERROR `exception` handlers must have type signature `[unsafe] fn()` - loop {} - } -}; diff --git a/tests/cfail/exception-input.rs b/tests/cfail/exception-input.rs deleted file mode 100644 index cb0711c..0000000 --- a/tests/cfail/exception-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[exception] - fn SVCall(undef: u32) { - //~^ ERROR `exception` handlers must have type signature `[unsafe] fn()` - } -}; diff --git a/tests/cfail/exception-invalid.rs b/tests/cfail/exception-invalid.rs deleted file mode 100644 index 0a7fb52..0000000 --- a/tests/cfail/exception-invalid.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[exception] - fn NonMaskableInt() { - //~^ ERROR only exceptions with configurable priority can be used as hardware tasks - } -}; diff --git a/tests/cfail/exception-output.rs b/tests/cfail/exception-output.rs deleted file mode 100644 index 758dbdd..0000000 --- a/tests/cfail/exception-output.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[exception] - fn SVCall() -> u32 { - //~^ ERROR `exception` handlers must have type signature `[unsafe] fn()` - 0 - } -}; diff --git a/tests/cfail/exception-sys-tick.rs b/tests/cfail/exception-sys-tick.rs deleted file mode 100644 index 69d73db..0000000 --- a/tests/cfail/exception-sys-tick.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[exception] - fn SysTick() { - //~^ ERROR the `SysTick` exception can't be used because it's used by the runtime - } -}; diff --git a/tests/cfail/idle-input.rs b/tests/cfail/idle-input.rs deleted file mode 100644 index 5095977..0000000 --- a/tests/cfail/idle-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[idle] - fn idle(undef: u32) { - //~^ ERROR `idle` must have type signature `[unsafe] fn() -> !` - } -}; diff --git a/tests/cfail/idle-not-divergent.rs b/tests/cfail/idle-not-divergent.rs deleted file mode 100644 index e90eff0..0000000 --- a/tests/cfail/idle-not-divergent.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[idle] - fn idle() { - //~^ ERROR `idle` must have type signature `[unsafe] fn() -> !` - } -}; diff --git a/tests/cfail/init-divergent.rs b/tests/cfail/init-divergent.rs deleted file mode 100644 index 54813d4..0000000 --- a/tests/cfail/init-divergent.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() -> ! { - //~^ 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 deleted file mode 100644 index 3bf0cad..0000000 --- a/tests/cfail/init-input.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init(undef: u32) { - //~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]` - } -}; diff --git a/tests/cfail/init-not-send.rs b/tests/cfail/init-not-send.rs deleted file mode 100644 index 3ac495f..0000000 --- a/tests/cfail/init-not-send.rs +++ /dev/null @@ -1,30 +0,0 @@ -//! This is equivalent to the `late-not-send` cfail test - -#![feature(extern_crate_item_prelude)] // ??? -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSend { - _0: PhantomData<*const ()>, -} - -#[app(device = lm3s6965)] //~ ERROR `*const ()` cannot be sent between threads safely -const APP: () = { - static mut X: Option<NotSend> = None; - - #[init(resources = [X])] - fn init() { - *resources.X = Some(NotSend { _0: PhantomData }) - } - - #[interrupt(resources = [X])] - fn UART0() {} -}; diff --git a/tests/cfail/init-output.rs b/tests/cfail/init-output.rs deleted file mode 100644 index 414a35a..0000000 --- a/tests/cfail/init-output.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() -> u32 { - //~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]` - 0 - } -}; diff --git a/tests/cfail/insufficient-free-interrupts.rs b/tests/cfail/insufficient-free-interrupts.rs deleted file mode 100644 index baa2582..0000000 --- a/tests/cfail/insufficient-free-interrupts.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] //~ ERROR 1 free interrupt (`extern { .. }`) is required -const APP: () = { - #[init] - fn init() {} - - #[task] - fn foo() {} -}; diff --git a/tests/cfail/interrupt-divergent.rs b/tests/cfail/interrupt-divergent.rs deleted file mode 100644 index 4a01533..0000000 --- a/tests/cfail/interrupt-divergent.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[interrupt] - fn UART0() -> ! { - //~^ ERROR `interrupt` handlers must have type signature `[unsafe] fn()` - loop {} - } -}; diff --git a/tests/cfail/interrupt-input.rs b/tests/cfail/interrupt-input.rs deleted file mode 100644 index d0240f4..0000000 --- a/tests/cfail/interrupt-input.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[interrupt] - fn UART0(undef: u32) { - //~^ ERROR `interrupt` handlers must have type signature `[unsafe] fn()` - } -}; diff --git a/tests/cfail/interrupt-output.rs b/tests/cfail/interrupt-output.rs deleted file mode 100644 index 37cd7c2..0000000 --- a/tests/cfail/interrupt-output.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[interrupt] - fn UART0() -> u32 { - //~^ ERROR `interrupt` handlers must have type signature `[unsafe] fn()` - 0 - } -}; diff --git a/tests/cfail/late-assigned-to-init.rs b/tests/cfail/late-assigned-to-init.rs deleted file mode 100644 index 70a361c..0000000 --- a/tests/cfail/late-assigned-to-init.rs +++ /dev/null @@ -1,16 +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 X: u32 = (); - - #[init(resources = [X])] //~ ERROR late resources can NOT be assigned to `init` - fn init() {} -}; diff --git a/tests/cfail/late-not-send.rs b/tests/cfail/late-not-send.rs deleted file mode 100644 index eb3048d..0000000 --- a/tests/cfail/late-not-send.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! `init` has a static priority of `0`. Initializing resources from it is equivalent to sending a -//! message to the task that will own the resource - -#![feature(extern_crate_item_prelude)] // ??? -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -struct NotSend { - _0: PhantomData<*const ()>, -} - -#[app(device = lm3s6965)] //~ ERROR `*const ()` cannot be sent between threads safely -const APP: () = { - static mut X: NotSend = (); - - #[init] - fn init() -> init::LateResources { - init::LateResources { - X: NotSend { _0: PhantomData }, - } - } - - #[interrupt(resources = [X])] - fn UART0() {} -}; diff --git a/tests/cfail/late-uninit.rs b/tests/cfail/late-uninit.rs deleted file mode 100644 index 55122ed..0000000 --- a/tests/cfail/late-uninit.rs +++ /dev/null @@ -1,18 +0,0 @@ -// TODO remove in v0.5.x - -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - static mut X: u32 = (); //~ ERROR late resources MUST be initialized at the end of `init` - - #[init] - fn init() {} -}; diff --git a/tests/cfail/needs-send.rs b/tests/cfail/needs-send.rs deleted file mode 100644 index 7e3ca30..0000000 --- a/tests/cfail/needs-send.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![feature(extern_crate_item_prelude)] // ??? -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSend { - _0: PhantomData<*const ()>, -} - -unsafe impl Sync for NotSend {} - -#[app(device = lm3s6965)] //~ ERROR cannot be sent between threads safely -const APP: () = { - #[init(spawn = [foo])] - fn init() {} - - #[task] - fn foo(_x: NotSend) {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/needs-sync.rs b/tests/cfail/needs-sync.rs deleted file mode 100644 index f25f91a..0000000 --- a/tests/cfail/needs-sync.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![feature(extern_crate_item_prelude)] // ??? -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use core::marker::PhantomData; - -use rtfm::app; - -pub struct NotSync { - _0: PhantomData<*const ()>, -} - -unsafe impl Send for NotSync {} - -#[app(device = lm3s6965)] //~ ERROR cannot be shared between threads safely -const APP: () = { - static X: NotSync = NotSync { _0: PhantomData }; - - #[init(spawn = [foo])] - fn init() {} - - #[task(priority = 1, resources = [X])] - fn foo() {} - - #[task(priority = 2, resources = [X])] - fn bar() {} - - extern "C" { - fn UART0(); - fn UART1(); - } -}; diff --git a/tests/cfail/priority-too-high.rs b/tests/cfail/priority-too-high.rs deleted file mode 100644 index ec32401..0000000 --- a/tests/cfail/priority-too-high.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] //~ error evaluation of constant value failed -const APP: () = { - #[init] - fn init() {} - - // OK, this is the maximum priority supported by the device - #[interrupt(priority = 8)] - fn UART0() {} - - // this value is too high! - #[interrupt(priority = 9)] - fn UART1() {} -}; diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs deleted file mode 100644 index 6dcbfd6..0000000 --- a/tests/cfail/priority-too-low.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - // OK, this is the minimum priority that tasks can have - #[interrupt(priority = 1)] - fn UART0() {} - - // this value is too low! - #[interrupt(priority = 0)] //~ error this literal must be in the range 1...255 - fn UART1() {} -}; diff --git a/tests/cfail/resource-not-declared.rs b/tests/cfail/resource-not-declared.rs deleted file mode 100644 index f6d08a6..0000000 --- a/tests/cfail/resource-not-declared.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init(resources = [X])] //~ ERROR this resource has NOT been declared - fn init() {} -}; diff --git a/tests/cfail/resource-pub.rs b/tests/cfail/resource-pub.rs deleted file mode 100644 index 970fc6c..0000000 --- a/tests/cfail/resource-pub.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - pub static mut X: u32 = 0; - //~^ ERROR resources must have inherited / private visibility - - #[init] - fn init() {} -}; diff --git a/tests/cfail/task-divergent.rs b/tests/cfail/task-divergent.rs deleted file mode 100644 index 3822d75..0000000 --- a/tests/cfail/task-divergent.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[task] - fn foo() -> ! { - //~^ ERROR `task` handlers must have type signature `[unsafe] fn(..)` - loop {} - } - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/task-idle.rs b/tests/cfail/task-idle.rs deleted file mode 100644 index 62d927b..0000000 --- a/tests/cfail/task-idle.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[task] - fn idle() { - //~^ ERROR `task` handlers can NOT be named `idle`, `init` or `resources` - } - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/task-not-declared.rs b/tests/cfail/task-not-declared.rs deleted file mode 100644 index 3e6d87c..0000000 --- a/tests/cfail/task-not-declared.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init(spawn = [X])] //~ ERROR this task has NOT been declared - fn init() {} -}; diff --git a/tests/cfail/used-free-interrupt-2.rs b/tests/cfail/used-free-interrupt-2.rs deleted file mode 100644 index 616d308..0000000 --- a/tests/cfail/used-free-interrupt-2.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[interrupt(binds = UART0)] //~ ERROR free interrupts (`extern { .. }`) can't be used as interrupt handlers - fn foo() {} - - extern "C" { - fn UART0(); - } -}; diff --git a/tests/cfail/used-free-interrupt.rs b/tests/cfail/used-free-interrupt.rs deleted file mode 100644 index 78ae540..0000000 --- a/tests/cfail/used-free-interrupt.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![no_main] -#![no_std] - -extern crate lm3s6965; -extern crate panic_halt; -extern crate rtfm; - -use rtfm::app; - -#[app(device = lm3s6965)] -const APP: () = { - #[init] - fn init() {} - - #[interrupt] - fn UART0() {} //~ ERROR free interrupts (`extern { .. }`) can't be used as interrupt handlers - - extern "C" { - fn UART0(); - } -}; |
