From bc526b8d74cb548c9da8d5c10d6013008e164ba5 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 6 Sep 2018 01:04:39 +0200 Subject: add compile-fail tests for passing arguments to the attributes --- cortex-m-rt/tests/compile-fail/exception-args.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cortex-m-rt/tests/compile-fail/exception-args.rs (limited to 'cortex-m-rt/tests/compile-fail/exception-args.rs') diff --git a/cortex-m-rt/tests/compile-fail/exception-args.rs b/cortex-m-rt/tests/compile-fail/exception-args.rs new file mode 100644 index 0000000..85613ff --- /dev/null +++ b/cortex-m-rt/tests/compile-fail/exception-args.rs @@ -0,0 +1,16 @@ +#![no_main] +#![no_std] + +extern crate cortex_m_rt; +extern crate panic_semihosting; + +use cortex_m_rt::{entry, exception}; + +#[entry] +fn foo() -> ! { + loop {} +} + +#[exception(SysTick)] //~ ERROR custom attribute panicked +//~^ HELP `exception` attribute must have no arguments +fn SysTick() {} -- cgit v1.2.3