diff options
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/entry-twice.rs')
-rw-r--r-- | cortex-m-rt/tests/compile-fail/entry-twice.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cortex-m-rt/tests/compile-fail/entry-twice.rs b/cortex-m-rt/tests/compile-fail/entry-twice.rs new file mode 100644 index 0000000..757083a --- /dev/null +++ b/cortex-m-rt/tests/compile-fail/entry-twice.rs @@ -0,0 +1,17 @@ +#![no_main] +#![no_std] + +extern crate cortex_m_rt; +extern crate panic_halt; + +use cortex_m_rt::entry; + +#[entry] +fn foo() -> ! { + loop {} +} + +#[entry] //~ ERROR symbol `main` is already defined +fn bar() -> ! { + loop {} +} |