diff options
author | 2020-08-23 22:16:07 +0000 | |
---|---|---|
committer | 2020-08-23 22:16:07 +0000 | |
commit | f4a85dcc92e90e27588cbe14e0447b89f672e30f (patch) | |
tree | 4af03e376f2c48f35109f3da21c5e96354975b4d /cortex-m-rt/tests/compile-fail/hard-fault-twice.rs | |
parent | cbb3c4e63079a2a70b09f8038606b1c51f34675d (diff) | |
parent | bb868f4a90c6eff142801bc1a19b135483eed312 (diff) | |
download | cortex-m-f4a85dcc92e90e27588cbe14e0447b89f672e30f.tar.gz cortex-m-f4a85dcc92e90e27588cbe14e0447b89f672e30f.tar.zst cortex-m-f4a85dcc92e90e27588cbe14e0447b89f672e30f.zip |
Merge #289
289: Make it unsafe to define NMI handlers r=therealprof a=jonas-schievink
Reverts https://github.com/rust-embedded/cortex-m-rt/pull/257
Fixes https://github.com/rust-embedded/cortex-m-rt/issues/269
Fixes https://github.com/rust-embedded/cortex-m/issues/196 (see that thread for details)
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/hard-fault-twice.rs')
-rw-r--r-- | cortex-m-rt/tests/compile-fail/hard-fault-twice.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cortex-m-rt/tests/compile-fail/hard-fault-twice.rs b/cortex-m-rt/tests/compile-fail/hard-fault-twice.rs index 030b54c..03b79a5 100644 --- a/cortex-m-rt/tests/compile-fail/hard-fault-twice.rs +++ b/cortex-m-rt/tests/compile-fail/hard-fault-twice.rs @@ -12,7 +12,7 @@ fn foo() -> ! { } #[exception] -fn HardFault(_ef: &ExceptionFrame) -> ! { +unsafe fn HardFault(_ef: &ExceptionFrame) -> ! { loop {} } @@ -20,7 +20,7 @@ pub mod reachable { use cortex_m_rt::{exception, ExceptionFrame}; #[exception] //~ ERROR symbol `HardFault` is already defined - fn HardFault(_ef: &ExceptionFrame) -> ! { + unsafe fn HardFault(_ef: &ExceptionFrame) -> ! { loop {} } } |