diff options
author | 2023-07-21 14:16:46 +0200 | |
---|---|---|
committer | 2023-07-21 14:16:46 +0200 | |
commit | f07d5b3241cb2e70c37d049caab64d75ef32860b (patch) | |
tree | 68fe2b1d247f6adfcb29391f7cf4c083c4f19101 /cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs | |
parent | 3bd46e56e4e4c138cb51900f47280cc991f51702 (diff) | |
download | cortex-m-f07d5b3241cb2e70c37d049caab64d75ef32860b.tar.gz cortex-m-f07d5b3241cb2e70c37d049caab64d75ef32860b.tar.zst cortex-m-f07d5b3241cb2e70c37d049caab64d75ef32860b.zip |
Changed setup for better compiler diagnostics. We won't get a nasty assembly error anymore
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs')
-rw-r--r-- | cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs b/cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs new file mode 100644 index 0000000..3610170 --- /dev/null +++ b/cortex-m-rt/tests/compile-fail/hard-fault-twice-mixed-trampoline.rs @@ -0,0 +1,26 @@ +#![no_main] +#![no_std] + +extern crate cortex_m_rt; +extern crate panic_halt; + +use cortex_m_rt::{entry, exception, ExceptionFrame}; + +#[entry] +fn foo() -> ! { + loop {} +} + +#[exception(trampoline = false)] +unsafe fn HardFault() -> ! { + loop {} +} + +pub mod reachable { + use cortex_m_rt::{exception, ExceptionFrame}; + + #[exception] //~ ERROR symbol `_HardFault` is already defined + unsafe fn HardFault(_ef: &ExceptionFrame) -> ! { + loop {} + } +} |